r/SpringBoot • u/ahmedzahran94 • Feb 25 '24
Map dto in controller
Hi my manager tell me that best practice is to map the returned dto from service layer in controller not in service Would any one agree with this ? My knowledge is the controller just one line and just delegate the logic to service layer and just return the response entity
23
Upvotes
4
u/naturalizedcitizen Feb 25 '24
In service layer. Your manager is wrong.