当前位置:   article > 正文

If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.

if you want an embedded database (h2, hsql or derby), please put it on the c
Description:
 
Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
//无法配置数据库,没有指定url属性,并且无法配置embedded datasource
Reason: Failed to determine a suitable driver class
//原因:无法明确指定正确的驱动类(driver.class)
 
Action:
 
Consider the following:
    If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
    If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active).
 
//建议:
//如果如果需要加载嵌入式的数据库,请将他放入路径中
//如果有数据库设置需要从指定配置文件中加载,需要调用该配置文件(目前没有活动的配置文件)
 
Process finished with exit code 1

按照上述的解决办法:)

程序入口处:
 
@SpringBootApplication
public class DemoApplication {
 
修改为:
@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
public class DemoApplication {
}

 

转载于:https://www.cnblogs.com/qingmuchuanqi48/p/11531459.html

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Cpp五条/article/detail/611552
推荐阅读
相关标签
  

闽ICP备14008679号