设置spring.datasource.tomcat.max-active = 1时出错连接池

时间:2018-01-24 08:45:48

标签: java spring hibernate jdbctemplate

我是spring + hibernate创建项目的新手。

我正在使用Oracle SQL Developer进行DB和eclipse进行开发。

在Spring启动application.properties文件中,我们有以下选项:

  

spring.datasource.tomcat.max-active = 1

当我开始项目时,DB中有2个会话(数据库工具中有1个)。

在应用程序运行期间,发生错误

  

Occured :: MSG = org.apache.tomcat.jdbc.pool.PoolExhaustedException:   [https-jsse-nio-8888-exec-2]超时:池空。无法获取   连接在10秒内,没有可用[尺寸:1;忙:1;空闲:0;   lastwait:10000]

请给我解释或解决此错误的方法。

非常感谢。

0 个答案:

没有答案
相关问题