配置文件多数据源时报连接超时错误

springboot 2.X多数据源配置时:

Connection marked as broken because of SQLSTATE(08S01), ErrorCode(0);

Communications link failure

发现连接池配置问题,于是添加设置

spring.datasource.dynamic.datasource.hive.continue-on-error=true
spring.datasource.dynamic.datasource.hive.hikari.max-pool-size=100
spring.datasource.dynamic.datasource.hive.hikari.max-lifetime=60000,
问题解决,附大佬博客地址!!!!


附一个链接:https://blog.csdn.net/luckyrocks/article/details/107782284
上一篇:dynamic_cast和static_cast


下一篇:springboot动态数据源用shardingjdbc按时间分表