idea识别不了yml文件

报错提示:java.lang.IllegalStateException: Failed to load property source from location ‘classpath:/application.yml’

Caused by: org.yaml.snakeyaml.error.YAMLException: java.nio.charset.MalformedInputException: Input length = 1

在这里插入图片描述
在这里插入图片描述

YML文件支持的解决方案

问题

由于使用技术需要,项目使用springboot,对自动生成的properties改成yml后缀,发现ide默认对yml的支持不好。搜索了网上发现并没有好的解决方案。

解决方案

在这里插入图片描述
确保上述插件选项勾选,重启ide 即可

文件关联
在这里插入图片描述
效果
在这里插入图片描述

发布了100 篇原创文章 · 获赞 8 · 访问量 4102

猜你喜欢

转载自blog.csdn.net/weixin_44106334/article/details/103846599