let's think about a simple User insert operation. My Spring related classes to do this job are UserController
, UserService
, UserServiceImpl
, UserDAO
, UserDAOImpl
.
At controller side i call userService.insert(new User())
and in userService.insert()
method i call userDAO.insert(user)
. I think there is a method duplication at this pattern.
Is there a way to avoid method duplication? May be my coding is faulty. I wait your replies, experiences...
Thank in advance...