springcloud-gateway启动报错ApplicationContextException: Unable to start ServletWebServerApplicationConte

转自:https://stackoverflow.com/questions/50231736/applicationcontextexception-unable-to-start-servletwebserverapplicationcontext/50232382

去掉了冲突依赖:

<!--<dependency>-->
    <!--<groupId>org.springframework.boot</groupId>-->
    <!--<artifactId>spring-boot-starter-web</artifactId>-->
<!--</dependency>-->

依然报错:最后发现引入servlet-api导致的

<!--<dependency>-->
    <!--<groupId>javax.servlet</groupId>-->
    <!--<artifactId>javax.servlet-api</artifactId>-->
    <!--<scope>provided</scope>-->
<!--</dependency>-->
<!--<dependency>-->
    <!--<groupId>javax.interceptor</groupId>-->
    <!--<artifactId>javax.interceptor-api</artifactId>-->
<!--</dependency>-->

去掉就启动成功了

猜你喜欢

转载自blog.csdn.net/ww_ndsc_ww/article/details/106131815