Caused by: org.springframework.data.mapping.PropertyReferenceException: No property hosscheduleId found for type Schedule! Did you mean 'hosScheduleId'?
at org.springframework.data.mapping.PropertyPath.<init>(PropertyPath.java:90)
at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:437)
at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:413)
at org.springframework.data.mapping.PropertyPath.lambda$from$0(PropertyPath.java:366)
at java.util.concurrent.ConcurrentMap.computeIfAbsent(ConcurrentMap.java:324)
at org.springframework.data.mapping.PropertyPath.from(PropertyPath.java:348)
at org.springframework.data.mapping.PropertyPath.from(PropertyPath.java:331)
at org.springframework.data.repository.query.parser.Part.<init>(Part.java:81)
SpringBoot项目启动报错!!
=解决方法====
原因是我在ScheduleRepository中使用的方法是getScheduleByHoscodeAndHosscheduleId
按照jpa的规范这个就是去找Schedule类的hosScheduleId属性和hoscode属性去查询,而我的Schedule的类实体是
而我写成getScheduleByHoscodeAndHosscheduleId(), 找不到,就报错了!
以下供参考!