Caused by: java.lang.IllegalArgumentException: jdbcUrl is required with (已解决)

配置多数据源一般会碰见这个问题,其实得改数据库链接的url

spring.datasource.url: jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC
spring.datasource.username=root
spring.datasource.password=123456
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver

改成

spring.datasource.jdbc-url: jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC
spring.datasource.username=root
spring.datasource.password=123456
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver

在这里插入图片描述
OK,解决。

猜你喜欢

转载自blog.csdn.net/weixin_45906830/article/details/110441808
今日推荐