5253545556575859606162
return dao.getAll(); } @Transactional(readOnly = false) public User create(String username, String password) { User user = new User(); user.setUsername(username); user.setPassword(password); save(user); return user; }
5152535455565758596061
return sessionFactory.getCurrentSession().createCriteria(User.class) .list(); } public User create(String username, String password) { User user = new User(); user.setUsername(username); user.setPassword(password); save(user); return user; }