1、报错如下 Failed to configure a DataSource: ‘url’ attribute is not specified and no embedd 意思是:无法配置DataSource:未指定’url’属性,也无法配置嵌入数据源。 2、解决步骤:
在application.yml文件中添加数据源的配置
spring:
datasource:
url: jdbc:mysql://localhost:3306/DBtest?useUnicode=true&characterEncoding=UTF-8&useSSL=false
password: 1234
username: root
driver-class-name: com.mysql.jdbc.Driver
3、重新mvn install,控制台输出成功,如下图: