1.通信链路故障
详细错误:com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
问题原因:
解决办法:
2.未能找到合适的驱动程序类
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
问题原因:没有正确加载到dao层的配置
因为将application.yml配置文件放在了dao层,不知道为什么没有加载进去
将上面配置文件内容放到了web层配置文件中项目正常启动和访问
解决方法:让服务读取到配置文件
分析:
如何放在dao层下也可以正确的解析到层数配置?