I'm writing my first spring boot/hibernate/jpa web app using rest controllers. I'm basically following along online resources such as
My question is, using that particular tutorial as an example, in a case where I make a rest call to the controller:
but in addition to the list of notes that that function returns, I also want a list of most recent comments, recently viewed notes, maybe update some info re: the users status....how do I combine all that info?
Do I use a master controller that has multiple @Auitowired repositories?
If you are doing a simple project that you will not require maintenance then you could put all of those in a 'master' controller if you want. It isn't a good design though. if you put logic combining that data into the controller, then what if you want to get the combined data in another controller or another service?