springboot啟動報錯:Cannot determine embedded database driver class for database type NONE


springboot啟動報錯如下:

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默認會啟動一個嵌入的數據庫驅動,但是需要配置,我的項目中不需要用到數據庫,所以需要跳過數據庫檢查

在application類上添加

@EnableAutoConfiguration(exclude = {DataSourceAutoConfiguration.class})

即可


免責聲明!

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



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