出现错误:java.lang.IllegalStateException: Failed to load property source from location 'classpath:/application.yml'
java.lang.IllegalStateException: Failed to load property source from location 'classpath:/application.yml'
![1759749-a0bbea7ec34341ea.png](https://upload-images.jianshu.io/upload_images/1759749-a0bbea7ec34341ea.png)
image.png
查看application.yml
文件格式都正确,在编码不同的情况下格式有所变化。
![1759749-36c7895254a4852c.png](https://upload-images.jianshu.io/upload_images/1759749-36c7895254a4852c.png)
image.png
Reload前先另存好文件内容,避免乱码。
![1759749-fd374c1ef60a8bb6.png](https://upload-images.jianshu.io/upload_images/1759749-fd374c1ef60a8bb6.png)
image.png
yml配置文件的使用在idea要另外安装YAML插件
![1759749-436a2abc42854e3f.png](https://upload-images.jianshu.io/upload_images/1759749-436a2abc42854e3f.png)
image.png