Beans that inherit from java.lang.AutoCloseable
will be properly closed
by the DisposableBeanAdapter
when Spring
shuts down.
On the other hand, as far as I can tell from simple printf
debugging, Beans
inheriting from reactor.core.Disposable
are not disposed
at shutdown.
I feel more comfortable with such a feature being provided by default in Spring WebFlux
, so I will issue a feature request.
Comment From: snicoll
Thanks for the proposal but we can't really add such a feature to Spring WebFlux. This is a core container feature and while it makes sense to handle a common interface from the JDK, I don't think we should do so on a library like reactor.