你好,我也是这种情况,数据库连接池使用的是druid,spring.datasource.druid.initial_size=10
spring.datasource.druid.min_idle=10
spring.datasource.druid.max_active=50
spring.datasource.druid.max_wait=60000
spring.datasource.druid.time_between_eviction_runs_millis=60000
spring.datasource.druid.min_evictable_idle_time_millis=300000
spring.datasource.druid.validation_query=SELECT 'x'
spring.datasource.druid.test_while_idle=true
spring.datasource.druid.test_on_borrow=false
spring.datasource.druid.test_on_return=false
spring.datasource.druid.pool_prepared_statements=true
spring.datasource.druid.max_pool_prepared_statement_per_connection_size=20
spring.datasource.druid.filters=wall,stat
spring.datasource.druid.connection_properties=druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
但是 貌似没有生效,多数据源和你这配置的一致
Spring Boot多数据源配置及No operations allowed after connection closed连接异常的解决Spring boot的单数据源配置比较简单,只需要在application.properties配置相关的jdbc连接的参数即可,下面简单的介绍下spring boot的J...