我正在使用 spring boot 2.1.1 版本并使用 @EnableWebFlux
但我遇到了一些错误。
错误是
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.reactive.config.DelegatingWebFluxConfiguration': Initialization of bean failed; nested exception is java.lang.IllegalStateException: The Java/XML config for Spring MVC and Spring WebFlux cannot both be enabled, e.g. via @EnableWebMvc and @EnableWebFlux, in the same application
我该如何解决这个问题。
最佳答案
您不能在 Spring SPR-16609 中同时启用 Spring MVC 和 Spring WebFlux
它提供了一种使用响应式(Reactive)存储库的解决方法:
关于java - 带有@EnableWebFlux 注释的 SpringWebFlux 错误,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/54069614/