configure a DataSource: ‘url‘ attribute is not specified and no embedded dat"/>
SpringBoot微服务 Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded dat
翻译过来是:未能配置数据源:未指定“url”属性,并且没有嵌入的数据源coul
两种方法:
第一种取消自动配置数据库
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
在启动类的SpringBootApplication上取消配置
第二种是在配置文件上配置数据库的相关信息
spring:datasource:url: jdbc:mysql://localhost:3306/xxxxusername: rootpassword: rootdriver-class-name: com.mysql.jdbc.Driver
更多推荐
SpringBoot微服务 Failed to configure a DataSource: ‘url‘ attribute is not specified
发布评论