首页 > 数据库技术 > 详细

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

时间:2020-02-12 18:57:54      阅读:68      评论:0      收藏:0      [点我收藏+]

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

原文:https://www.cnblogs.com/geektcp/p/12299829.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!