I'm using spring boot 2.1.1 version and use @EnableWebFlux
but I got some errors.
Errors are
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
How can I fix this problem.
spring-webmvc
as well as thespring-webflux
jars on your classpath trigger both to be configured. – Perspire@EnableWebFlux
as Spring Boot automatically does that for you. If you want to customize the configuration just create anWebFluxConfigurer
in your project and add an@Configuration
annotation to it. – Perspire