美文网首页
SpringBoot启动错误处理:Failed to deter

SpringBoot启动错误处理:Failed to deter

作者: 放肆的桃子 | 来源:发表于2021-04-19 16:05 被阅读0次
image.png

解决方案 1:

    @SpringBootApplication(exclude= {DataSourceAutoConfiguration.class})

解决方案 2:

1.添加如下依赖

 <dependency>

        <groupId>org.springframework.boot</groupId>

        <artifactId>spring-boot-starter-web</artifactId>

        <!-- 移除嵌入式tomcat插件 不移除会启动报错 -->

        <exclusions>

            <exclusion>

                <groupId>org.springframework.boot</groupId>

                <artifactId>spring-boot-starter-tomcat</artifactId>

            </exclusion>

        </exclusions>

    </dependency>

2.必须要加否则启动失败

<dependency>

        <groupId>javax.servlet</groupId>

        <artifactId>javax.servlet-api</artifactId>

    </dependency>

相关文章

网友评论

      本文标题:SpringBoot启动错误处理:Failed to deter

      本文链接:https://www.haomeiwen.com/subject/oljxkltx.html