Closed snicoll closed 6 years ago
This behavior shows that after stopping and restarting a new server instance with the new Spring context, reactor-netty's HttpServer
has still a reference to the previous handler, which holds itself a reference to the old Spring WebFlux infrastructure (beans, context and all).
I've opened reactor/reactor-netty#90 as our current use of the HttpServer
API is wrong, or there might be a bug in reactor-netty.
I can't reproduce this with the WebFlux and Reactive MongoDB starters. Have I missed something?
Are you using Reactor Netty, or another server implementation instead (Tomcat, Undertow, Jetty?).
The other possible reason is that the changes you're making to your project aren't "incompatible" with the previous version which still runs. Declaring a WebFlux controller handler and changing its behavior (as I've done in the reactor netty issue I've created) should trigger the issue.
Note: technically, that BeanCreationException
is not the issue to reproduce, but rather the application still using the context that has been closed already.
Note: I've added a temporary workaround for this in 330aa70
A WebFlux app using netty can lead to "ReactiveWebServerApplicationContext has been closed already"