Skip to content

LoggingSystem not available on shutdown to log DisposableBean#destroy invocations #26660

@HaojunRen

Description

@HaojunRen

I run Spring Boot 2.5.0 application in Spring Tool Suite (Version: 3.9.7.RELEASE). Stopping that application by STS 'stop' button, I find destroy of DisposableBean not excuted. If I return to Spring Boot 2.4.x or 2.3.x, the function will be fine.

Is it an issue or be lated with Spring Tool Suite? Refer to my code, in 2.5.0, ‘Shutting down...’ loggger won't print...

public class MyOperation implements DisposableBean {

    private static final Logger LOG = LoggerFactory.getLogger(MyOperation.class);

    @Override
    public void destroy() throws Exception {
        LOG.info("Shutting down...");
    }

}

Metadata

Metadata

Labels

type: regressionA regression from a previous release

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions