当启动一个不连接数据库的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}
则可以正常启动