请求大牛帮忙!!java.sql.SQLException: connect error, url ${blade.datasource.dev.url}

Blade 未结 2 3037
qq5345339
qq5345339 剑童 2021-08-09 10:35

你好遇到这个问题你是怎么解决的?


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  


2条回答
  • 2021-08-09 11:33

    检查你的这个URL : ${blade.datasource.dev.url}

    0 讨论(0)
  • 2021-08-09 23:52

    这是没有连接读取到nacos配置导致的错误,参考这个帖子的步骤:https://sns.bladex.cn/q-41.html

    0 讨论(0)
提交回复