Open ashirman opened 6 years ago
Any reasons why spring-boot-devtools doesn't work out of the box with REACTIVE application context? Having said that is it an issue or explicitly defined behaviour?
I suspect it was an oversight when WebFlux support was added in 2.0. DevTools remote update functionality isn't that widely used as far as we know.
Any drawbacks in usage of devtools filters in a provided manner
I'm not sure as I'm not sufficiently familiar with how WebFlux integrates with Tomcat other than knowing that it builds on top of Servlet's async support. @bclozel may be able to tell us more.
To support this across all four container we would need WebFlux equivalents of much of the code in org.springframework.boot.devtools.remote.server
which is currently Servlet-specific. I guess we need to decide if it's worth the effort or if we should document this as a limitation.
I was trying to use remote devtools with webflux app. After spending a considerable amount of time I came to know that this issue is still open.
Please, share whether any plan to support this in near future?
Sorry for the wasted time, @ChiragMoradiya. I've opened https://github.com/spring-projects/spring-boot/issues/28955 to make sure that we've clearly documented that using DevTools with a remote application is not supported with WebFlux.
I'm sure you were frustrated so thank you for asking nicely about the status of this issue. This issue is assigned to the General Backlog. That means that it's something that we'd like to do at some point, but we do not have any concrete plans to do so. We have a number of other higher priority items on our plates at the moment so I'm afraid that it's unlikely that we'll get to this one any time soon.
@wilkinsona Thank you for the prompt reply!
No problem. I understand and respect your priority schedule. Yes, documenting the fact will help others to discover this in advance.
Any update on this feature? It would be great to enable remote devtools for hot reload with docker build image and reactive applications
@ferrerogg please see above. Any updates will appear as comments and/or a change to the assigned milestone.
Hello,
I am creating spring-boot application (
version 2.0.1.RELEASE
) using kotlin (1.2.41
), java 8 (Oracle's JDK1.8.0.172
) and webflux provided byboot:spring-boot-starter-webflux
starter. The application entry point looks like followingit works fine from webflux stack perspective but it does not allow to use any functionality from
spring-boot-devtools
and Remote Update in particular. I've detected that devtools-related beans such asDispatcherFilter
,UrlHandlerMapper
,HttpRestartServerHandler
etc were registered successfully in the context but the only issue is that webcontext of embedded tomcat is not aware of them at all. So, even filter bean was registered in the context it is not a part of embedded tomcat servlet context and it does not receive any incoming requests.Need to note that I am aware of completely different conception of webflux/reactive flow comparing to old-way servlets/filtes flow. But at the same time I see no reason not to have
devtools
available within REACTIVE web application type. Please correct me if I am wrong.Here is an example how it was possible to run
devtools
usingTomcatReactiveWebServerFactory
(was inspired mostly by this approach https://stackoverflow.com/a/48790976)Well, after such a workaround (mostly because it works fine with tomcat and won't work fine with netty where we can't customise servlet context in a such way AFAIK) remote restart works fine and a URI
.~~spring-boot!~/restart
is available for clients.My questions are following:
spring-boot-devtools
doesn't work out of the box with REACTIVE application context? Having said that is it an issue or explicitly defined behaviour?@ConditionalOn
from what I feel)?