mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Previously, when using Tomcat, its web app class loader was the thread context class loader when H2ConsoleAutoConfiguration triggered initialization of Hikari's pool. This was the case because it's done in the bean method of a ServletRegistrationBean. Such Servlet-related beans are intentionally created with Tomcat's web app classloader as the TCCL. This arrangement results in the pool's threads using Tomcat's web app class loader as their TCCL which is not desirable. One consequence of this was that Tomcat could log a warning at shutdown about the thread being left running when it will, in fact, be stopped as part of the context being closed. This commit updates H2ConsoleAutoConfiguration to set the TCCL to its own ClassLoader while the DataSource information is being logged. Closes gh-32382 |
||
---|---|---|
.. | ||
src | ||
build.gradle |