Attempted to load applicationConfig: [classpath:/application.yml] but snakeyaml was not found on the classpath
时间: 2024-04-25 22:22:13 浏览: 25
这个错误信息表明在加载应用程序配置文件时,尝试使用snakeyaml库,但是该库在类路径上找不到。\[1\]\[2\]根据引用\[3\]的建议,你可以在项目的pom文件中添加以下依赖项来解决这个问题:
```xml
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
</dependency>
```
这将确保snakeyaml库被正确加载到项目的类路径中,从而解决该错误。
#### 引用[.reference_title]
- *1* *3* [java.lang.IllegalStateException:[classpath:/application.yml]snakeyaml was not found on the classpath](https://blog.csdn.net/qq_35606010/article/details/105073228)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [# Caused by: java.lang.IllegalStateException: Attempted to load applicationConfig: [classpath:/appli](https://blog.csdn.net/weixin_50396443/article/details/123884127)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]