PropertyReferenceException: No property
来源:互联网 发布:手机推广软件赚钱 编辑:程序博客网 时间:2024/06/14 08:13
在分页的时候遇到了
Caused by: org.springframework.data.mapping.PropertyReferenceExcepti
这个错误
原因见:http://blog.sina.com.cn/s/blog_a23e4a880101b52e.html
来自:http://www.iteye.com/topic/1127339
public interface UserDao extends JpaRepository {
User findByLoginName(String loginName);
}
Caused by: org.springframework.data.mapping.PropertyReferenceException: No property login found for type com.wzx.bean.User
at org.springframework.data.mapping.PropertyPath.(PropertyPath.java:74)
at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:326)
at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:352)
at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:306)
at org.springframework.data.mapping.PropertyPath.from(PropertyPath.java:270)
User findByLoginName(String loginName);
如果采用JPA默认的命名规范,应该写成
User findByLoginname(String loginName); 这样会默认找loginname 属性
否则findByLoginName 这样找的是Login对象的name属性,如果不想改名字最好就加上 @Query 注解写清楚
如果采用JPA默认的命名规范,应该写成
User findByLoginname(String loginName);
否则findByLoginName 这样找的是Login对象的name属性,如果不想改名字最好就加上 @Query 注解写清楚
0 0
- PropertyReferenceException: No property
- jpa PropertyReferenceException: No property user found for User异常
- jpa中PropertyReferenceException: No property found for type异常原因
- Caused by: org.springframework.data.mapping.PropertyReferenceException: No property name found for t
- Spring Data JPA 报错 :PropertyReferenceException: No property params found for type xxx!
- Spring Data Jpa 异常:PropertyReferenceException: No property xx for type yy
- org.springframework.data.mapping.PropertyReferenceException: No property name found for type User
- No property 'sessionFactory' found
- No property 'sessionFactory' found
- No getter method for property
- C#疑惑篇-no indexed property!?
- No setter found for property 问题 解决办法
- Property 'XXXXXX' has no read method. SKIPPED
- Error:No such property: nexusUsername for class
- No property month found for type **TbExamResult**!
- No typehandler found for property creationDate
- no typehandler found for property XXXX 解决
- No typehandler found for property XXX
- 并发编程系列之一:锁的意义
- 20150127Review
- 13 第十三天【健身】
- three.js 源码注释(七十一)extras/geometries/CylinderGeometry.js
- 【考纲】2013年系统集成项目管理工程师(中级)考试大纲-刘俊平
- PropertyReferenceException: No property
- 对于Freescale MFG编程工具控制文件ucl.xml的分析
- Android DrawerLayout 高仿QQ5.2双向侧滑菜单
- 异常数据检测
- conditional random field
- 动作识别之STIP(Space-Time Interest Point)(四)
- POJ 1006-Biorhythms-生理周期峰值(中国剩余问题)
- Cocos2d-x-3.0触屏事件(单点触摸)
- uboot 和linux 下flash 写入速度差异分析