springboot 启动报错:Cannot determine embedded database driver class for database type NONE

来源:互联网 发布:网络语cbd女生 编辑:程序博客网 时间:2024/06/09 19:54

springboot 启动时报:

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

原因是没有连接数据源的问题。

解决办法:
1.在@SpringBootApplication中排除其注入
@SpringBootApplication(exclude={DataSourceAutoConfiguration.class,HibernateJpaAutoConfiguration.class})

2.如果是maven项目在pom.xml中注释掉springboot mybatis 依赖就可以了

<dependency>         <groupId>org.mybatis.spring.boot</groupId>         <artifactId>mybatis-spring-boot-starter</artifactId>         <version>1.3.0</version></dependency>
阅读全文
2 0
原创粉丝点击