This is an extension library to the Spring Data JPA complex or dynamic SQL query. 这是一个比 MyBatis 更加强大的 Spring Data JPA 扩展库,为解决复杂动态 JPQL (或 SQL) 而生。https://blinkfox.github.io/fenix
当不启用fenix时是正常的。
当增加@EnableFenix 后。两个配置文件改为:
@EnableFenix(entityManagerFactoryRef = "primaryEntityManagerFactory", //
transactionManagerRef = "primaryTransactionManager", //
basePackages = {"com.example.iap.two"}) // 设置Repository所在位置
后启动一直报错
A component required a bean named 'entityManagerFactory' that could not be found.
数据源1: @Configuration @EnableTransactionManagement @EnableJpaRepositories(entityManagerFactoryRef = "primaryEntityManagerFactory", // transactionManagerRef = "primaryTransactionManager", // basePackages = {"com.example.iap.two"}) // 设置Repository所在位置 public class PrimaryConfig {
}
数据源2: @Configuration @EnableTransactionManagement @EnableJpaRepositories(entityManagerFactoryRef = "secondaryEntityManagerFactory", // transactionManagerRef = "secondaryTransactionManager", // basePackages = { "com.example.iap.two" }) // 设置Repository所在位置 public class SecondaryConfig {
}
当不启用fenix时是正常的。 当增加@EnableFenix 后。两个配置文件改为: @EnableFenix(entityManagerFactoryRef = "primaryEntityManagerFactory", // transactionManagerRef = "primaryTransactionManager", // basePackages = {"com.example.iap.two"}) // 设置Repository所在位置 后启动一直报错 A component required a bean named 'entityManagerFactory' that could not be found.
参考之前的issue也没能解决。请教各位大大这种错误是哪个地方配置有问题