slyak / spring-data-jpa-extra

spring data jpa with template dynamic query (eg: freemarker,velocity etc.) like mybatis. The master branch already support springboot2+ spring5+
Apache License 2.0
400 stars 116 forks source link

启动报错,PropertyReferenceException: No property mgetOneByOne found for type ProcessNote! #57

Open pengcgithub opened 3 years ago

pengcgithub commented 3 years ago

springboot 1.5.4-release spring-boot-starter-jpa-extra 2.1.2.RELEASE

报错: PropertyReferenceException: No property queryProcessNoteStatistical found for type ProcessNote!

然后单元测试的时候是可以的,但是项目启动就报上述错误,一开始报的是No property mgetOneByOne found for type ProcessNote! 然后我源码中把这块给注释了,结果报我自定义的查询错误。实在是费解到底哪里出了问题,求解答。

pengcgithub commented 3 years ago

springboot 1.5.4-release spring-boot-starter-jpa-extra 2.1.2.RELEASE

报错: PropertyReferenceException: No property queryProcessNoteStatistical found for type ProcessNote!

然后单元测试的时候是可以的,但是项目启动就报上述错误,一开始报的是No property mgetOneByOne found for type ProcessNote! 然后我源码中把这块给注释了,结果报我自定义的查询错误。实在是费解到底哪里出了问题,求解答。

忽略上述问题,是我自己调试的问题。如果按照正常引入是没有问题。 spring-boot 1.5.4-release spring-boot-starter-jpa-extra 2.1.1.RELEASE

@EnableJpaRepositories(basePackages = "com.qianmi.oms", repositoryBaseClass = GenericJpaRepositoryImpl.class, repositoryFactoryBeanClass = GenericJpaRepositoryFactoryBean.class)

只做了上述配置,就能够正常启动。如果不能正常启动,大概率是spring版本的问题。