用springboot jpa 报:No property yer found for type OrderMaster错
報錯代碼
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerAdapter' defined in class path resource [org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Bean instantiation via factory method failed; ?nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.servlet.mvc.method.annotation. RequestMappingHandlerAdapter]: Factory method 'requestMappingHandlerAdapter' threw exception; ?nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mvcConversionService' defined in class path resource [org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Bean instantiation via factory method failed; ?nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.format.support. FormattingConversionService]: Factory method 'mvcConversionService' threw exception; ?nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'orderMasterDao': Invocation of init method failed; ?nested exception is org.springframework.data.mapping.PropertyReferenceException: No property yer found for type OrderMaster!
?最后一行
嵌套異常是org.springframework.data.mapping.PropertyReferenceException:沒有找到類型OrderMaster的屬性!?
錯誤代碼
public interface OrderMasterDao extends JpaRepository<OrderMaster,String> {// 根據openID查詢這個人的訂單 分頁Page<OrderMaster> findBybBuyerOpenid(String buyerOpenId, Pageable pageable); }?原因:方法名粗心大意寫錯
修改完代碼
public interface OrderMasterDao extends JpaRepository<OrderMaster,String> {// 根據openID查詢這個人的訂單 分頁Page<OrderMaster> findByBuyerOpenid(String buyerOpenId, Pageable pageable); }總結
以上是生活随笔為你收集整理的用springboot jpa 报:No property yer found for type OrderMaster错的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 钓鱼网站检测 repo复现
- 下一篇: 互斥事件的概率算法