2022.09.05
记录一下每日碰到的bug,今天使用gateway网关,然后报了springmvc和gateway不相容的错误,原因是gateway自带
spring-boot-starter-webflux:2.4.12,这个依赖下面有spring-web:5.3.12,父工程引入了spring-boot-starter-web,里面也有这个依赖,因此会造成依赖冲突。引入父工程的时候加上以下代码,排除父工程的依赖即可。
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</exclusion>
</exclusions>
gateway
spring-boot-starter-web