Error starting ApplicationContext. To display the auto-configuration report re-run your application

SpringBoot项目启动报错:Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.

Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2019-09-08 02:07:28.798 ERROR 10540 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION FAILED TO START
***************************

Description:

Cannot determine embedded database driver class for database type NONE

Action:

If you want an embedded database please put a supported one on the classpath. If you have database settings to be loaded from a particular profile you may need to active it (no profiles are currently active).


Process finished with exit code 1

启动springboot项目时,没有报错,但是后面自动终止。 查看pom文件

       <!-- spring boot整合mybatis -->
        <dependency>
            <groupId>org.mybatis.spring.boot</groupId>
            <artifactId>mybatis-spring-boot-starter</artifactId>
            <version>1.3.0</version>
        </dependency>

        <!-- MySQL -->
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
        </dependency>

解决办法:在pom.xml去掉跟数据库相关的依赖(mysql-connection-java.jar、mybatis.xxx.jar、pageHelper、数据库连接池等)

如果有这些依赖的话,默认配置文件中必须有配置。如数据库连接配置。

 

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

EngineerForSoul

你的鼓励是我孜孜不倦的动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值