在学习springcloud入门案例的时候,启动服务工程发现报错:
1.问题记录:
APPLICATION FAILED TO START
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).Disconnected from the target VM, address: ‘127.0.0.1:2533’, transport:
‘socket’
2.问题分析:
看报错提示信息,显示未能读取到数据库连接的配置,所以应该查看配置文件格式是否正确
3.问题排查:
查看文件格式,yaml格式,配置项是否有错漏;
发现问题:
发现配置yaml和yml文件不能识别为绿叶配置文件,