SpringBoot应用Rest接口长时间未被调用的情况下,尝试一次调用,连接数据库读取数据,会发生报错: No operations allowed after connection closed. Possibly consider using a shorter maxLifetime value application.yml加入如下配置: spring: datasource: hikari: minimum-idle: 3 max-lifetime: 0 maximum-pool-size: 5 配置说…