I have my own bean:
@Bean
public MyBean myBean(){...
after spring documentation for releasing my own resources, I have to specify destroyMethod. I did not find the default destruction methods called by spring unless destroyMethodspecified directly.
I used
@Bean(destroyMethod = "close")
public MyBean myBean(){...
but consider not specifying the destroy method directly if it has a default value.
Does the spring is the default, for example destroy, close, release? If spring tries to use some methods to release resources by default, which ones?
source
share