当前位置:
首页 >
行业知识 >
解决Please set spring.main.web-application-type=reactive or remove spring-boot-starter-web dependency.
行业知识
解决Please set spring.main.web-application-type=reactive or remove spring-boot-starter-web dependency.
2026-11-05 21:46:43
来源:互联网转载
gateway运行时报错
原因很明显:SpringMVC和SpringCloudGateway不共存,但是我子项目pom文件根本没有spring-boot-starter-web,是从父项目继承过来的
解决方法①:在application.yml添加spring.main.web-application-type=reactive
格式如图解决方法②:用exclusions排除spring-boot-starter-web依赖
org.springframework.boot spring-boot-starter-web * *