[SpringBoot]java.lang.IllegalArgumentException: jdbcUrl is required with driverClassName.

【问题描述】

SpringBoot2.3.1配置ShardingSphere4.1.0时报错,如下所示:

spring.shardingsphere.datasource.ds1.type=com.alibaba.druid.pool.DruidDataSource
spring.shardingsphere.datasource.ds1.driver-class-name=com.mysql.jdbc.Driver
spring.shardingsphere.datasource.ds1.url=jdbc:mysql://localhost:3306/ds1
spring.shardingsphere.datasource.ds1.username=root
spring.shardingsphere.datasource.ds1.password=root

【解决方案】

spring.datasource.url -->spring.datasource.jdbc-url,问题解决。

原文地址:https://www.cnblogs.com/liuyp-ken/p/13360859.html