当前位置: 移动技术网 > IT编程>开发语言>Java > 奇葩的Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.

奇葩的Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.

2020年01月16日  | 移动技术网IT编程  | 我要评论

 

 

 启动springboot的时候莫名其妙出现这个错误,我properties里面也没配置数据源啥的,但就是出现这个错误

解决方法:

在启动类上加@springbootapplication(exclude= {datasourceautoconfiguration.class})

即在@springbootapplication上加(exclude= {datasourceautoconfiguration.class})

其他因为数据源的问题出现的这个错误网上好多,这里不赘述。

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网