java.lang.IllegalStateException: Failed to load property source from 'file:/D:/AA158/talent/ e4%ba%a7%e6%9d%b1%80%e8%81%8c%e7%a7%b0%e8%af%b3%bb%e7%bb%9f/5SRC_Branch/Service/web/target/classes/config/application.yml' (classpath:/config/application.yml)
 

Attempted to load applicationConfig: [classpath:/config/application.yml] but snakeyaml was not found on the classpath

错误大概就是上面的内容

初始以为是yml文件错误,但是看了很多遍yml没错,之后又以为是文件格式错误,但是全部改为UTF-8也不行。

后来去查了资料,发现这个错得加个依赖:

 
  1. <dependency>

  2. <groupId>org.yaml</groupId>

  3. <artifactId>snakeyaml</artifactId>

  4. </dependency>

具体为什么会出现这个错,等有空了再研究研究。

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐