文章目录
前言:本文为SpringBoot项目配置文件.yaml/.yml文件编写时没有自动提示的解决方案
一、五花八门的解决方案


同样的,当resources中只存在.properties文件和.yaml文件时,.yaml文件会主动提示信息,并且样式变成小绿叶


当resources中仅存在.yaml配置文件时,可以主动提示信息

同样的,当resources中仅存在.yml配置文件时,可以主动提示信息
二、通用解决方案
点击File---->点击Project Structure...
点击Facets---->点击Spring对应的项目---->点击小绿叶标识
点击+号
将不主动提示信息的.yaml/.yml文件选中---->之后点击OK
点击OK
点击OK
我们看到它们均变成了小绿叶,且均可以主动提示信息