trouble shooting(Cannot determine embedded database driver class for database type NONE)

Posted geektcp

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了trouble shooting(Cannot determine embedded database driver class for database type NONE)相关的知识,希望对你有一定的参考价值。

报错如下:
***************************
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).

 

根因分析:

这个报错的原因非常多。

 

springboot启动时会自动注入数据源和配置jpa

解决办法:在@SpringBootApplication中排除其注入

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

 

这个方法是暴力的干掉了数据库连接, 这是不可能, 因为用框架写代码不可能不连接数据库的。

 

以上是关于trouble shooting(Cannot determine embedded database driver class for database type NONE)的主要内容,如果未能解决你的问题,请参考以下文章

trouble shooting1--MacBook Pro 终端连接上云主机

trouble shooting(mybatis)

trouble shooting(mybatis)

Mysql create constraint foreign key faild.trouble shooting method share

trouble shooting2-安装完centos7虚拟机,使用不了ls命名

[Trouble Shooting - Python] TypeError: 'builtin_function_or_method' object is not subscripta