spring boot服务器启动报错'spring.datasource.url' is not specified

报错信息

'spring.datasource.url' is not specified and no embedded datasource could be auto-configured.

原因数据库没有配置,在启动的文件的注解@SpringBootApplication中加入参数

@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
最后成功解决错误,因为新项目刚刚搭建,还没有连接数据库。

猜你喜欢

转载自blog.csdn.net/searlas/article/details/80104942