Quellcode durchsuchen

不能用账号登录

longmeizhen@avic-s.com vor 1 Jahr
Ursprung
Commit
02bdba105e
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. 2 2
      src/main/java/com/palmnest/dao/hibernate/UserDaoHibernate.java

+ 2 - 2
src/main/java/com/palmnest/dao/hibernate/UserDaoHibernate.java

@@ -116,9 +116,9 @@ public class UserDaoHibernate extends GenericDaoHibernate<User, Long> implements
 				}
 			}
 		}else{
-//			throw new UsernameNotFoundException("user '" + username
-//					+ "' not found...");
 			log.info("loadUserByUsername进来了这里");
+			throw new UsernameNotFoundException("user '" + username
+					+ "' not found...");
 		}
 		String     strHql = "from User where (username=? or telephone=?) and   isenabled=1";
 		List<User> users  = getSession().createQuery(strHql).setString(0, username).setString(1, username).list();