包的位置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