Set name for shutdown hook Thread #23670
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
Method
org.springframework.context.support.AbstractApplicationContext#registerShutdownHook
register shutdown hook Thread to close context on JVM shutdown,https://github.com/spring-projects/spring-framework/blob/master/spring-context/src/main/java/org/springframework/context/support/AbstractApplicationContext.java#L941
But it doesn't set name for this Thread. It's common good practice to set proper names for java thread to make diagnostic and troubleshooting easier.
I propose to set some name for shutdown hook Threads. For example
SpringContextShutdownHook-N
instead of currentThread-N
.This is how such threads look in Eclipse MAT
The text was updated successfully, but these errors were encountered: