我有一个使用jhipster编写的spring boot应用程序,不久前就将其提交给我们的项目。它已经在WebLogic下运行,并且我正在将其移至Tomcat9的过程中,准备进行云迁移。我发现当我访问执行器的“ health”时,应用程序返回{“ status”:“ DOWN”},并且它正在尝试连接到数据库。
[我不想让它尝试连接。我尝试浏览该应用程序,但未发现似乎引起此问题的设置。我敢肯定它在那里。
有人知道我应该去哪里吗?
引发了以下异常:
2020-04-13 07:41:32.003 ERROR 16156 --- [nio-8080-exec-9] o.a.tomcat.jdbc.pool.ConnectionPool : Unable to create initial connections of pool.
java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:743)
at oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:666)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:566)
at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:310)
at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:203)
at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:732)
at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:664)
at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:479)
at org.apache.tomcat.jdbc.pool.ConnectionPool.<init>(ConnectionPool.java:154)
at org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:118)
.
.
.
当添加执行器框架时,将启用数据库运行状况检查。
您可以使用此属性禁用数据库运行状况检查:
management.health.db.enabled=false
在此处了解有关所有执行器特性的更多信息:https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#actuator-properties