wimdeblauwe / htmx-spring-boot

Spring Boot and Thymeleaf helpers for working with htmx
Apache License 2.0
521 stars 49 forks source link

webflux support #24

Closed tubbynl closed 3 months ago

tubbynl commented 2 years ago

i really liked your talk and this concept, it would be even more awesome if this also works with

<dependency>
     <groupId>org.springframework.boot</groupId>
     <artifactId>spring-boot-starter-webflux</artifactId>
</dependency>

in https://developer.okta.com/blog/2022/03/24/thymeleaf-security#create-the-first-controller-class there's an example controller on how to render a template async, it's not really a thing (yet) but good for future support

tubbynl commented 2 years ago

it will probably require an webflux alternative to HtmxMvcConfiguration

netbizltd commented 1 year ago

Regarding htmx-spring-boot (not using thymeleaf but freemarker):

Any workaround for making out-of-band swaps (HtmxResponse) work in reactive Spring Boot?

I found that none of the annotations (@HxRequest, @HxTrigger) work and HtmxResponse throws exception at runtime.

dgradecak commented 6 months ago

reactive is quite different than servlet or imperative programming. Thus you would need much more different handling. However, even the spring folks are re-writing their Spring Cloud Gateway using servlets, and it was IMO the best use case for async/reactive programming. Another thing is that now we have virtual threads in Java, so for most of the applications there would be no real benefit using reactive anymore, sure there will still be some cases where it has better performances ... "but is it really worth the effort"

tubbynl commented 3 months ago

i dont think webflux support is relevant to start working on now virtual threads exist