包的位置java
Your ApplicationContext is unlikely to start due to a @ComponentScan of the default package
springboot項目啓動時,若是沒有配置數據庫配置,啓動時會拋出以下異常。mysql
Description: Cannot determine embedded database driver class for database type NONE Action:
springboot會自動注入數據源(由於我新建項目的時候,勾選了web、mysql、mybatis),而你卻沒有配,因此他就拋出該異常。web
如何不配 若是你只是簡單的想建個項目,並不須要數據庫支持,那麼你可讓他不去注入數據源。添加spring
@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
或者就不要依賴jdbc之類的jar包也就不會報錯了sql