你好遇到这个问题你是怎么解决的?
BladeAuthorizationServerConfiguration.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [com/alibaba/druid/spring/boot/autoconfigure/DruidDataSourceAutoConfigure.class]: Invocation of init method failed; nested exception is java.sql.SQLException: connect error, url ${blade.datasource.dev.url}, driverClass com.mysql.cj.jdbc.Driver
2021-01-05 10:22:54.830 ERROR [blade-auth,,,] 85510 --- [eate-1159524199] com.alibaba.druid.pool.DruidDataSource : create connection SQLException, url: ${blade.datasource.dev.url}, errorCode 0, state null
java.sql.SQLException: connect error, url ${blade.datasource.dev.url}, driverClass com.mysql.cj.jdbc.Driver
at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1721) ~[druid-1.2.1.jar:1.2.1]
at com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:2785) ~[druid-1.2.1.jar:1.2.1]
2021-01-05 10:22:55.002 ERROR [blade-auth,,,] 85510 --- [eate-1495678843] com.alibaba.druid.pool.DruidDataSource : create connection SQLException, url: ${blade.datasource.dev.url}, errorCode 0, state null
java.sql.SQLException: connect error, url ${blade.datasource.dev.url}, driverClass com.mysql.cj.jdbc.Driver
at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1721) ~[druid-1.2.1.jar:1.2.1]
at com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:2785) ~[druid-1.2.1.jar:1.2.1]
2021-01-05 10:22:55.335 ERROR [blade-auth,,,] 85510 --- [eate-1159524199] com.alibaba.druid.pool.DruidDataSource : create connection SQLException, url: ${blade.datasource.dev.url}, errorCode 0, state null
java.sql.SQLException: connect error, url ${blade.datasource.dev.url}, driverClass com.mysql.cj.jdbc.Driver
at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1721) ~[druid-1.2.1.jar:1.2.1]
at com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:2785) ~[druid-1.2.1.jar:1.2.1]
2021-01-05 10:22:55.508 ERROR [blade-auth,,,] 85510 --- [eate-1495678843] com.alibaba.druid.pool.DruidDataSource : create connection SQLException, url: ${blade.datasource.dev.url}, errorCode 0, state null
java.sql.SQLException: connect error, url ${blade.datasource.dev.url}, driverClass com.mysql.cj.jdbc.Driver
at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1721) ~[druid-1.2.1.jar:1.2.1]
at com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:2785) ~[druid-1.2.1.jar:1.2.1]
2021-01-05 10:22:55.524 WARN [blade-auth,,,] 85510 --- [ main] z.r.AsyncReporter$BoundedAsyncReporter : Timed out waiting for in-flight spans to send
2021-01-05 10:22:55.548 INFO [blade-auth,,,] 85510 --- [ main] ConditionEvaluationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2021-01-05 10:22:55.564 ERROR [blade-auth,,,] 85510 --- [ main] o.s.boot.SpringApplication
检查你的这个URL : ${blade.datasource.dev.url}
这是没有连接读取到nacos配置导致的错误,参考这个帖子的步骤:https://sns.bladex.cn/q-41.html
扫一扫访问 Blade技术社区 移动端