SpringBoot configures multiple data sources
Reference code: Spring Boot 1.5.8.RELEASE configure Oracle and MySQL at the same time
The original author used SpringBoot version 1.5.8. After upgrading to 2.0.*, the DataSourceBuilder has changed
//import org.springframework.boot.autoconfigure.jdbc.DataSourceBuilder; import org.springframework.boot.jdbc.DataSourceBuilder;
Report data source error: jdbcUrl is required with driverClassName.
It seems to be because the hikari connection pool is configured by default
Use spring.datasource.jdbc-url in the configuration file instead of the usual spring.datasource.url.
#spring.datasource.primary.url=*** spring.datasource.primary.jdbc-url=***
Reference: springboot2.0 multiple data source error: jdbcUrl is required with driverClassName.