.getBean("userService");
StringBuilder hqlBuilder = new StringBuilder(
"select new User(name,password) from User");
hqlBuilder.append(" where name = ?");
try {
List<User> result = userService.findByParam(hqlBuilder.toString(),
userName);
if (result == null) {
return null;
} else {
return result.get(0);