org.hibernate.hql.internal.ast.QuerysyntaxException:user is not mapped [from User where user_code=? and user_password=?]

初学者,一个很低级的错误吧!

找不到映射,最后发现没把类的Hibernate映射文件 添加到Hibernate核心配置文件中去,所以报了这个异常!

在核心文件中添加映射   <mapping resource="com/zsn/Mode/User.hbm.xml"/> 成功解决!

猜你喜欢

转载自www.cnblogs.com/Zhusi/p/10076499.html