I am curious about your opinion regarding to the proper implementation/usage of DI in Spring MVC:
There are two classes: One Controller which works with a List (for dropdown menu) and there is an another Service class which carries the List elements from DB layer.
How would you inject Service into Contoller in Spring MVC?
Is there a way to inject DropDownService.getDropDownItems() elements into DropDownController.dropDownItems List through Dependency Injection in this case? If yes, then how ;-)
Actually, I am looking for the most sophisticated solution, for this reason I am curious about your opinion!
To me that is the easiest. I am also under the assumption that you see the typo in your DropDownSerivce class and that that class is defined in a Spring configuration, either with @Service or as a ><bean> in your xml.