Caused by: org.springframework.data.mapping.PropertyReferenceException: No property hosscheduleId fo

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(), 找不到,就报错了!
以下供参考!
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值