springcloud项目启动时,启动报错:Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
分析:application.yml文件中已经配置了数据库
datasource: url: jdbc:mysql://localhost:3306/day1?serverTimezone=UTC&useSSL=false username: root password: plj824 driver-class-name: com.mysql.cj.jdbc.Driver
解决方案:通过分析发现,application.yml文件idea并未识别,进行手动添加。
此时,项目的application.yml文件被识别。