-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Closed
Labels
status: backportedAn issue that has been backported to maintenance branchesAn issue that has been backported to maintenance branchestype: documentationA documentation taskA documentation task
Milestone
Description
Cameron Steffen opened SPR-16078 and commented
This paragraph seems to imply that setting destroyMethod=""
will not disable destroy method inference for DisposableBean
, Closeable
and AutoCloseable
beans.
To disable destroy method inference for a particular
@Bean
, specify an empty string as the value, e.g.@Bean
(destroyMethod=""). Note that the DisposableBean and the Closeable/AutoCloseable interfaces will nevertheless get detected and the corresponding destroy/close method invoked.
Reference URL: https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/context/annotation/Bean.html#destroyMethod--
Issue Links:
- Infer "shutdown()" as destroy method for convenient EHCache setup using @Bean [SPR-9713] #14347 Infer "shutdown()" as destroy method for convenient EHCache setup using
@Bean
- Support bean disposal on ApplicationContext shutdown for Closeable beans [SPR-10034] #14668 Support bean disposal on ApplicationContext shutdown for Closeable beans
Referenced from: commits d1b5b5d, dff2c84
Backported to: 4.3.13
Metadata
Metadata
Assignees
Labels
status: backportedAn issue that has been backported to maintenance branchesAn issue that has been backported to maintenance branchestype: documentationA documentation taskA documentation task