欢迎光临
我们一直在努力

SpringCloud启动报错:'url' attribute is not specified

错误信息

Description:

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

Reason: Failed to determine a suitable driver class


Action:

Consider the following:
    If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
    If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active).


Process finished with exit code 1

解决办法:

在启动类上增加@EnableAutoConfiguration(exclude = {DataSourceAutoConfiguration.class}),如下:

@EnableRyFeignClients
@EnableAutoConfiguration(exclude = {DataSourceAutoConfiguration.class})
@SpringCloudApplication
public class AitlpAuthApplication {
    public static void main(String[] args) {
        SpringApplication.run(AitlpAuthApplication.class, args);
    }
}

参考:

  1. SpringBoot报错:Failed to configure a DataSource: ‘url’ attribute is not specified and no embedded
赞(0) 打赏
未经允许不得转载:Ddmit » SpringCloud启动报错:'url' attribute is not specified

评论 抢沙发

觉得文章有用就打赏一下文章作者

非常感谢你的打赏,我们将继续提供更多优质内容,让我们一起创建更加美好的网络世界!

支付宝扫一扫打赏

微信扫一扫打赏

登录

找回密码

注册