Unable to start web server; nested exception is org.springframework.context.ApplicationContextException

项目报错:Unable to start web server; nested exception is org.springframework.context.ApplicationContextException

解决方案一

<!-- 使用嵌入式Jetty作为web container -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-tomcat</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

解决方案二

出现了这个异常,
只要再pom文件里加上对应的 container deps: 

<dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-jetty</artifactId>
</dependency>
posted @ 2020-03-15 01:43  陈彦斌  阅读(11272)  评论(1编辑  收藏  举报