Closed shuangyue521 closed 3 years ago
你代码不全,不一定看得出问题,你用 @EnableFenix
试试,在这个注解中写 repositoryFactoryBeanClass=FenixJpaRepositoryFactoryBean.class, repositoryBaseClass=CommonRepositoryImpl.class
。实在不行,可以跟一下我的源码,看看,是不是少些啥东西了
你代码不全,不一定看得出问题,你用
@EnableFenix
试试,在这个注解中写repositoryFactoryBeanClass=FenixJpaRepositoryFactoryBean.class, repositoryBaseClass=CommonRepositoryImpl.class
。实在不行,可以跟一下我的源码,看看,是不是少些啥东西了
问题已解决,多谢
使用自定义扩展方法继承FenixSimpleJpaRepository,使用@QueryFenix 注解时报错
自定义扩展CommonRepositoryImpl: public class CommonRepositoryImpl<T,ID extends Serializable> extends FenixSimpleJpaRepository<T, ID> implements CommonRepository<T,ID> {
} 。。。。。。省略实现方法 启动类: @SpringBootApplication @EnableJpaRepositories(repositoryBaseClass = CommonRepositoryImpl.class) public class DispatchApplication {
}
@QueryFenix 注解所在方法
public interface MyframeTaskInfoRepository extends CommonRepository<MyframeTaskInfo,String> {
}
启动报错: Caused by: org.springframework.data.mapping.PropertyReferenceException: No property getAllTaskDetailInfo found for type MyframeTaskInfo!