How to use HikariCP in Spring Boot with two datasources in conjunction with Flyway
问题 I want to use HikariCP as JDBC connection pool in my Spring boot application. I have two datasources (MySQL database as the primary database and accessing those data through Hibernate and additionally an Oracle database for reading some other data through JDBCTemplate). I set the MySQL datasource as primary bean: @Bean @Primary @ConfigurationProperties("spring.datasource") public DataSourceProperties mySQLDataSourceProperties() { return new DataSourceProperties(); } @Bean @Primary