springbootstarterwebflux和springbootstarterjetty之间的java冲突
我有一个微服务应用程序,在我包括
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
</dependency>
所以我可以用反应式。 在微服务工件中,我想使用jetty嵌入式服务器,所以我包括了
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
</dependency>
现在我犯了这个错误
The Java/XML config for Spring MVC and Spring WebFlux cannot both be enabled, e.g. via @EnableWebMvc and @EnableWebFlux, in the same application.
我认为这是由于添加了webflux和jetty依赖项。 任何关于这个错误的想法以及如何克服它
# 1 楼答案
根据documentation的说法,这可以通过排除netty实现: