You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue was mostly resolved in #40178, but one edge case still left.
When app receives SIGTERM during application startup after ApplicationEnvironmentPreparedEvent, but before ApplicationContextInitializedEvent, Log4j2 (and other logging systems) will run shutdown handler in SpringApplicationShutdownHook, i.e. the one that is returned by org.springframework.boot.logging.log4j2.Log4J2LoggingSystem#getShutdownHandler. During shutdown it will try to read some properties (i.e. log4j2.disable.jmx) from SpringEnvironmentPropertySource which still holds reference to underlying environment.