@Component("userManager")
public class UserManagerImpl implements UserManager {
private UserDao userDao ;
public UserDao getUserDao() {
return userDao;
}
@Resource
public void setUserDao(UserDao userDao) {
this.userDao = userDao;
}
/* (non-Javadoc)
* @see com.wjs.registration.service.UserManager#exists(com.wjs.registration.model.Users)
*/
public boolean exists(Users u){
return userDao.checkUserExistsWithName(u.getUsername());
}
/* (non-Javadoc)
* @see com.wjs.registration.service.UserManager#add(com.wjs.registration.model.Users)
*/
public void add(Users u){
userDao.save(u);
}
}
LEATH
MM们