前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >解决 Cannot determine embedded database driver class for database type NONE

解决 Cannot determine embedded database driver class for database type NONE

作者头像
潇洒
发布2019-07-03 11:43:28
15.8K0
发布2019-07-03 11:43:28
举报
文章被收录于专栏:石头岛石头岛

刚搭的新项目一启动就报错,一直就知种起不来。各种搜索以后总结两种解决方式。 先看错误:

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).
处理方式一:

排除两个默认配置

@SpringBootApplication(exclude={DataSourceAutoConfiguration.class,HibernateJpaAutoConfiguration.class})

结论:没用

处理方式二: 可行

网上说各种多于的依赖导至的问题,经过排查,确实是由 pagehelper 这个依赖引起的。

<!--<dependency>-->
    <!--<groupId>org.hibernate</groupId>-->
    <!--<artifactId>hibernate-validator</artifactId>-->
    <!--<version>4.2.0.Final</version>-->
<!--</dependency>-->

<!--<dependency>-->
    <!--<groupId>org.mybatis.spring.boot</groupId>-->
    <!--<artifactId>mybatis-spring-boot-starter</artifactId>-->
    <!--<version>1.1.1</version>-->
<!--</dependency>-->

<!--pagehelper-->
<!--<dependency>-->
    <!--<groupId>com.github.pagehelper</groupId>-->
    <!--<artifactId>pagehelper-spring-boot-starter</artifactId>-->
    <!--<version>1.1.2</version>-->
<!--</dependency>-->

<!--<dependency>-->
    <!--<groupId>mysql</groupId>-->
    <!--<artifactId>mysql-connector-java</artifactId>-->
    <!--<version>5.1.21</version>-->
<!--</dependency>-->

总结:程序启动类不需要排除任务一个类,只需要去除引用却可。

其他思路 http://www.cnblogs.com/kmsfan/p/7189626.html

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2018-07-26,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 处理方式一:
  • 处理方式二: 可行
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档