Spring boot Spring数据JDBC和Hibernate JPA在一个项目中

Spring boot Spring数据JDBC和Hibernate JPA在一个项目中,spring-boot,spring-data-jpa,spring-data-jdbc,Spring Boot,Spring Data Jpa,Spring Data Jdbc,是否可以在一个项目中使用Spring数据JDBC和Spring数据hibernate @SpringBootApplication @ComponentScan(basePackages = {"com.meteor", "com.test"}) //@EnableMeteorTransactionManagement @EnableFeignClients(basePackages = "com.meteor.keycloak.utils&qu

是否可以在一个项目中使用Spring数据JDBC和Spring数据hibernate

@SpringBootApplication
@ComponentScan(basePackages = {"com.meteor", "com.test"})
//@EnableMeteorTransactionManagement
@EnableFeignClients(basePackages = "com.meteor.keycloak.utils")
@EnableJdbcRepositories(basePackages = {"com.test.coral"})
@EnableJpaRepositories(basePackages = {"com.meteor.coral"}, repositoryBaseClass = MeteorAdapterRepositoryImpl.class)
应用程序上下文似乎看不到这些bean

Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.test.coral.resources.useradministration.domain.AppUserRepo' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true), @org.springframework.beans.factory.annotation.Qualifier(value="appUserRepo")}
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1714)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1270)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1224)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:640)
    ... 29 more


谢谢

问题在于表注释映射

@Data
@Entity
@Table(name = "m_appuser", uniqueConstraints = @UniqueConstraint(columnNames = { "username" }, name = "username_org"))
@org.springframework.data.relational.core.mapping.Table

我需要添加Spring数据JDBC表注释以使其工作。

我也看到了这些。Spring数据JDBC-无法安全地识别存储库候选接口com.sxi.coral.resources.useradministration.domain.AppUserRepo的存储分配。如果您希望这个存储库是JDBC存储库,请考虑注释这些实体中的一个:Or.SrpFrrasWork.DATA Reloal.Cul.Mappig.Tab.