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/JustHereForTheCh1cks Feb 25 '24
What is the reasoning behind your „a controller method should consist only of one line of code“?