Should service layer accept a DTO or a custom request object from the controller?
问题 As the title suggests what is the best practice when designing service layers?. I do understand service layer should always return a DTO so that domain (entity) objects are preserved within the service layer. But what should be the input for the service layer from the controllers? I put forward three of my own suggestions below: Method 1: In this method the domain object (Item) is preserved within the service layer. class Controller { @Autowired private ItemService service; public ItemDTO