spring-boot/spring-boot-project
Andy Wilkinson dc75ca3942 Avoid capturing TCCL when creating DefaultResourceLoaders
Previously, DefaultResourceLoader instances were created using the
default constructor. This causes the resource loader to capture the
TCCL that was in place at that time. This can lead to a class loader
leak if the resource loader is referenced directly or indirectly from
a static field of a class loaded by a different class loader.

This commit updates the creation of DefaultResourceLoader instances
in main code so that the resource load will use the class loader of
the creating class. In almost all cases this will be the same class
loader as was the thread context class loader that was being captured
so the change in behavior is minimal. Crucially, it will still address
the situation where the TCCL was different.

Note the DevTools' ApplicationContextResourceLoader has been updated
to explicitly use the TCCL. This ensures that it uses the restart
class loader which is required for DevTools to function correctly.

Fixes gh-20900
2020-04-24 13:29:29 +01:00
..
spring-boot Avoid capturing TCCL when creating DefaultResourceLoaders 2020-04-24 13:29:29 +01:00
spring-boot-actuator Merge branch '2.2.x' 2020-04-22 11:59:22 -07:00
spring-boot-actuator-autoconfigure Remove metadata for configuration keys that were removed in 2.0 2020-04-23 16:14:13 +02:00
spring-boot-autoconfigure Avoid capturing TCCL when creating DefaultResourceLoaders 2020-04-24 13:29:29 +01:00
spring-boot-cli
spring-boot-dependencies Add dependency management for the Wavefront SDK 2020-04-21 16:35:18 +02:00
spring-boot-devtools Avoid capturing TCCL when creating DefaultResourceLoaders 2020-04-24 13:29:29 +01:00
spring-boot-docs Deprecate support for Bitronix 2020-04-24 11:37:44 +01:00
spring-boot-parent Upgrade to Testcontainers 1.14.0 2020-04-15 09:20:31 +02:00
spring-boot-properties-migrator Fix PropertiesMigrationListenerTests 2020-04-23 14:53:03 -07:00
spring-boot-starters Deprecate support for Bitronix 2020-04-24 11:37:44 +01:00
spring-boot-test Merge branch '2.2.x' 2020-04-23 14:35:08 -07:00
spring-boot-test-autoconfigure
spring-boot-tools Use current timestamp for index files with Gradle 2020-04-23 16:05:32 -05:00