在使用Spring Boot进行应用开发时,常常需要对数据源进行配置。但是有时在配置中会出现Failed to configure a DataSource: ‘url’ attribute is not specified and no embe的错误,这是因为在进行数据源配置时,未指定url属性或没有嵌入式数据库。
解决方式1 排除数据库:
@SpringBootApplication(exclude= {DataSourceAutoConfiguration.class})

解决方式2 补充数据源:
在yml文件中添加上数据源


9915

被折叠的 条评论
为什么被折叠?



