阅读 186

Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.

Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug‘ enabled.
2021-05-12 16:29:24.984 ERROR 17880 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION FAILED TO START
***************************

Description:

Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded datasource could be configured.

Reason: Failed to determine a suitable 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

报错原因:未扫描到数据库配置文件,我是application.properties

解决方法:在pom里加上扫描语句,需要扫描什么后缀加什么


    
        src/main/java
        
            **/*.yml
            **/*.properties
            **/*.xml
        
        false
    
    
        src/main/resources
        
            **/*.yml
            **/*.properties
            **/*.xml
        
        false
    

原文:https://www.cnblogs.com/yiyuzi/p/14760459.html

文章分类
代码人生
版权声明:本站是系统测试站点,无实际运营。本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 XXXXXXo@163.com 举报,一经查实,本站将立刻删除。
相关推荐