0
Nexion
8y

Just found a service method that saves an entity that isn't related to that service, that returns a ModelAndView object. I think my brain just broke. 1) Single Responsibility Principal. Do not save ObjectB in ObjectAService. 2) Services should not be aware of your view context. That's what controllers are for. Do not return a ModelAndView from a service method.

Comments
Add Comment