Spring boot data jpa multiple datasources entityManagerFactory error
问题 I want to use two databases with Spring Boot. Here the code: first db config @Configuration @EnableAutoConfiguration @EnableJpaRepositories( basePackages = {"net.elyland.pipe.repositories.router"}, entityManagerFactoryRef = "routerEntityManagerFactory", transactionManagerRef = "routerTransactionManager") @EnableTransactionManagement @PropertySource("classpath:application.properties") @ComponentScan(basePackages = {"net.elyland.pipe.domain.router"}) public class RouterRepositoryConfiguration {