The biggest reasons I tend to have a service level for two reasons ...
Labeling methods are like @Transactional, so all DAO requests inside this method are executed in a single transaction.
I can reinforce the concerns of the DAO and the role of the user. I can point out methods that require specific user roles, and therefore it works great with Spring Security.
You can simply call the DAO from the controller, but it will leave you stuck if you want to expand them later. To get the connection, you can mark the service as @Transactional, and the DAO as @Repository and Spring process everything, getting a session object for you and for injection, etc.
I tend to think (perhaps incorrectly) about the level of service as that it is accessed through a web service or controller or something else, it keeps the separation.
source share