Closed andreminin closed 7 years ago
After checking spring web mvc/flux and thymeleaf source code I found that issue has been fixed in thymeleaf 3.0.7-SNAPSHOT; after updating pom in the demo project, it runs without errors.
Change in POM file:
@andreminin thank you for opening the issue. I have downgraded the 'spring boot parent' from 2.0.0.M2 to 2.0.0.M1 to enable compatibility with 'thymeleaf' version 3.0.6.RELEASE
Once the 'thymeleaf' version 3.0.7 become stable (Milestone or Release), I will upgrade spring boot and 'thymeleaf' libraries to latest.
The demo should be functional now:
I am getting error "getApplicationContext() - no such method". ThymeleafReactiveViewResolver in this demo project is loaded from spring-webflux 5.0.0.RC2;
Thymeleaf project created with spring-web 5 module where ThymeleafReactiveViewResolver extended from ApplicationObjectSupport and has method getApplicationContext(); in spring-webflux 5 ThymeleafReactiveViewResolver doesn't have method getApplicationContext() and application fails on opening root context in browser.
Error stack: java.lang.NoSuchMethodError: org.thymeleaf.spring5.view.reactive.ThymeleafReactiveViewResolver.getApplicationContext()Lorg/springframework/context/ApplicationContext; at org.thymeleaf.spring5.view.reactive.ThymeleafReactiveViewResolver.loadView(ThymeleafReactiveViewResolver.java:581) ~[thymeleaf-spring5-3.0.6.M4.jar:3.0.6.M4] at org.thymeleaf.spring5.view.reactive.ThymeleafReactiveViewResolver.resolveViewName(ThymeleafReactiveViewResolver.java:569) ~[thymeleaf-spring5-3.0.6.M4.jar:3.0.6.M4] at org.springframework.web.reactive.result.view.ViewResolutionResultHandler.lambda$resolveViews$2(ViewResolutionResultHandler.java:272) ~[spring-webflux-5.0.0.RC2.jar:5.0.0.RC2] at reactor.core.publisher.FluxConcatMap$ConcatMapImmediate.drain(FluxConcatMap.java:350) ~[reactor-core-3.1.0.M2.jar:3.1.0.M2] at reactor.core.publisher.FluxConcatMap$ConcatMapImmediate.onSubscribe(FluxConcatMap.java:205) ~[reactor-core-3.1.0.M2.jar:3.1.0.M2]