Spring MVC found on classpath, which is incompatible with Spring Cloud Gateway at this time.

我已经把父工程中以下依赖移除掉了,但是她还是报Spring MVC found on classpath, which is incompatible with Spring Cloud Gateway at this time. 说我依赖重复了,重复就重复了呗,为啥还报错还就搞不明白了


            org.springframework.boot
            spring-boot-starter-web

原来是springcloudgateway的内部是通过netty+webflux实现的,webflux实现和springmvc配置依赖冲突。

将上面依赖改为以下


            org.springframework.cloud
            spring-cloud-starter-gateway
            
                
                    org.springframework.boot
                    spring-boot-starter-web
                
                
                    org.springframework.boot
                    spring-boot-starter-webflux
                
            
        

============================================================================================

加一句,这个springcloud中的gateway越来越玄,我启动几次不行,把我配置重新删除,重新手打就行了,而且和前面代码都是一模一样,maven依赖也重新加载过,可怕

你可能感兴趣的:(springcloud,spring,java)