Hello there!
School has asked me to work on a project during this semester, not even providing any online lessons & lacking out on educative information such as bad presentations & bad examples. They said if u make this project u will learn like everything. But my problem is, when I run stuck, no one is out there to help me, so I hope I find a good sould on here that can help me out on this.
I 've had to program a classdiagram with a few design patterns. This was like the easiest part. But they also asked me to make a web application with a few functionalities. Those functionalities are routed via controllers. Now the thing is, they asked me to make a function that will generate 5 objects for every entity & put the 5 generated objects in your MySQL server.
I 've managed to make it work for 1 entity, but I can 't make it work for 2 entities. I can generate all the objects, but I can only save it for one entity per controller.
(I can only link one repository per controller, so how am I supposed to link all the entities their repositories to one controller?)
I've tried to use the same requestmapping in 2 controllers, but this brings up an error, telling me that a requestmapping can only be defined in one controller.
Anyone here who can help me out on this?
Additional information:
My first controller code:
My second controller code:
My goal here is to fuse those functions togheter into one controller. (idk how to & searching on google give me wrong answers)
Class diagram:
Edit: If the first screenshot link shows this "https://cache.nulled...ibb.co/6s26HrF"
the code looks almost the same on my second controller, but the name & repository is different.