abideZLQ opened a new issue #11248:
URL: https://github.com/apache/shardingsphere/issues/11248
一、envorment:
sharding jdbc3.1 + springboot2.0.0.M2 + mybatis plus 3
二、start-up error:
java.lang.Object.wait(Native Method)
java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143)
com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:43)
2021-07-09 15:02:05.218 INFO 13436 --- [ main]
utoConfigurationReportLoggingInitializer :
Error starting ApplicationContext. To display the auto-configuration report
re-run your application with 'debug' enabled.
2021-07-09 15:02:05.242 ERROR 13436 --- [ main]
o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
Binding to target [Bindable@4f8d86e4 type = java.util.Map<?, ?>, value =
'none', annotations = array<Annotation>[[empty]]] failed:
Reason: Failed to bind properties under 'sharding.jdbc.datasource.db' to
java.util.Map<?, ?>
Action:
Update your application's configuration
Process finished with exit code 1
三、application.properties:
server.port=8088
# MySQL
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
#spring.datasource.url=jdbc:mysql://192.168.168.194:3306/pmpp?serverTimezone=GMT%2b8&zeroDateTimeBehavior=convertToNull
spring.datasource.url=jdbc:mysql://localhost:3306/pmpp?serverTimezone=GMT%2b8&zeroDateTimeBehavior=convertToNull
#spring.datasource.username=ctvit
#spring.datasource.password=ctvitadmin
spring.datasource.username=root
spring.datasource.password=root
spring.session.store-type=none
## 单库分表
sharding.jdbc.datasource.names=db
## 第一个数据库
sharding.jdbc.datasource.db.type=com.zaxxer.hikari.HikariDataSource
sharding.jdbc.datasource.db.driver-class-name=com.mysql.jdbc.Driver
sharding.jdbc.datasource.db.jdbc-url=jdbc:mysql://localhost:3306/pmpp?characterEncoding=utf-8
sharding.jdbc.datasource.db.username=root
sharding.jdbc.datasource.db.password=root
# 水平拆分的数据库(表) 配置分表策略 行表达式分片策略
sharding.jdbc.config.sharding.tables.pmpp_log.actual-data-nodes=db.pmpp_log$->{0..1}
# 分片算法表达式
sharding.jdbc.co
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]