Nacos集成spring cloud gateway

今天使用Nacos集成spring cloud gateway,记录一下
最开始我创建了一个module :cloud-gateway,并且在pom文件里配置这样(部分代码截取):

 
        com.example
        demo
        1.0.0
    

然后启动的时候,就说已经使用了gateway,让去掉spring-boot-starter-web的依赖,因为我的父级pom里引入了spring-boot-starter-web。

Spring MVC found on classpath, which is incompatible with Spring Cloud Gateway at this time. Please remove spring-boot-starter-web dependency.

然后我就把 改了,



    4.0.0
    
        org.springframework.boot
        spring-boot-starter-parent
        2.3.5.RELEASE
         
    
    com.example
    cloud-gateway
    0.0.1-SNAPSHOT
    cloud-gateway
    Demo projec

你可能感兴趣的:(gateway,spring,cloud,alibaba)