idea创建springboot项目出现的问题
生活随笔
收集整理的這篇文章主要介紹了
idea创建springboot项目出现的问题
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
當啟動一個不連接數據庫的springboot時,會報錯
Cannot determine embedded database driver class for database type NONE 是因為springboot在啟動時,會掃描DataSource相關配置的包所以
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}) public class SpringbootApplication {public static void main(String[] args) {SpringApplication.run(SpringbootApplication.class, args);} }
在啟動入口注解中加入 exclude = {DataSourceAutoConfiguration.class}則可以正常啟動
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}) public class SpringbootApplication {public static void main(String[] args) {SpringApplication.run(SpringbootApplication.class, args);} }
在啟動入口注解中加入 exclude = {DataSourceAutoConfiguration.class}則可以正常啟動
總結
以上是生活随笔為你收集整理的idea创建springboot项目出现的问题的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: webstorm破解方法(亲测可用)
- 下一篇: HBase1.0.0 实现数据增删查