原始配置:
spring.datasource.primary.url=jdbc:mysql://localhost:3306/test?setUnicode=true&characterEncoding=utf8&serverTimezone=UTC
spring.datasource.primary.username=root
spring.datasource.primary.password=52261340
spring.datasource.primary.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.secondary.url=jdbc:mysql://localhost:3306/test2?setUnicode=true&characterEncoding=utf8&serverTimezone=UTC
spring.datasource.secondary.username=root
spring.datasource.secondary.password=123456
spring.datasource.secondary.driver-class-name=com.mysql.cj.jdbc.Driver
报一下错误:
修改后配置:
jdbc换成 jdbc-url
spring.datasource.primary.jdbc-url=jdbc:mysql://localhost:3306/test?setUnicode=true&characterEncoding=utf8&serverTimezone=UTC
spring.datasource.primary.username=root
spring.datasource.primary.password=123456
spring.datasource.primary.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.secondary.jdbc-url=jdbc:mysql://localhost:3306/test2?setUnicode=true&characterEncoding=utf8&serverTimezone=UTC
spring.datasource.secondary.username=root
spring.datasource.secondary.password=123456
spring.datasource.secondary.driver-class-name=com.mysql.cj.jdbc.Driver