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


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 {
}

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM