Caused by: org.springframework.data.mapping.PropertyReferenceException: No property type found for t
2019-05-16 10:44
2496 查看
Caused by: org.springframework.data.mapping.PropertyReferenceException: No property type found for type SysDictionary! Did you mean 'dType','DType'?
at org.springframework.data.mapping.PropertyPath.<init>(PropertyPath.java:92)
at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:356)
at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:332)
at org.springframework.data.mapping.PropertyPath.lambda$from$0(PropertyPath.java:285)
记录下做项目遇到的错误,用的是SpringBoot+jpa。经过检查,发现dao层接口方法写错了参数,这是jpa的规范,不大熟悉的人估计都要经历一波。
解决:
查看实体类发现参数是dType
而Repository中我写成了 :findDistinctByType(String dType),By后面的type少了个d
改成: SysDictionary findDistinctByDType(String dType);
总结:总得来说就是jpa的规范限制的,需要做的就是方法名By的参数根据实体类中的来就不会报此错。
相关文章推荐
- Caused by: org.springframework.data.mapping.PropertyReferenceException: No property name found for t
- org.springframework.data.mapping.PropertyReferenceException: No property created found for type
- org.springframework.data.mapping.PropertyReferenceException: No property xxxx found for type Xxxx
- org.springframework.data.mapping.model.MappingException: No id property found for object of type
- Spring Data JPA 报错 :PropertyReferenceException: No property params found for type xxx!
- Caused by: org.springframework.data.mapping.PropertyReferenceException
- Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [
- 品优购项目异常No qualifying bean of type [org.springframework.data.redis.core.RedisTemplate] found for depe
- Spring Data Jpa 异常:PropertyReferenceException: No property xx for type yy
- org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.oskyhang.gbd.service.UserService] found for dependency: expected at least 1 bean which qualifies as aut
- Spring Data JPA - “No Property Found for Type” Exception
- org.springframework.data.mapping.PropertyReferenceException: No property name found for type User
- Caused by: org.springframework.beans.NullValueInNestedPathException: Invalid property 'xxxx'
- 错误提示:Caused by: org.hibernate.MappingException: Could not determine type for
- Spring MVC错误:Caused by: java.lang.NoClassDefFoundError: org/springframework/dao/DataAccessException
- 错误提示:Caused by: org.hibernate.PropertyNotFoundException: Could not find a getter for ID
- Spring Data JPA: No property name found for type ×××
- 错误:Caused by: org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'iCustome
- org.springframework.data.mapping.PropertyReference
- 解决:ould not find a getter for porDate in class com.bc.bean.PortalSheet Caused by: org.hibernate.PropertyNotFoundException: Could