Attempted to load applicationConfig: [classpath:/config/application.yml] but snakeyaml was not found
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/a
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也不行。
后来去查了资料,发现这个错得加个依赖:
-
<dependency>
-
<groupId>org.yaml</groupId>
-
<artifactId>snakeyaml</artifactId>
-
</dependency>
具体为什么会出现这个错,等有空了再研究研究。
更多推荐
所有评论(0)