Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded

异常如下图:
Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded

解决方法:
1.配置文件(application.properties)配置数据库连接信息
Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded

2.在SpringBoot启动程序中添加(exclude=DataSourceAutoConfiguration.class)排除JDBC自动装配。

Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded