现在使用SpringBoot开发的项目,配置文件大多采用yml格式,这种格式层次清晰,比较好看,估计有很多小白,发现安装了stst插件,在编辑yml配置文件时,仍然没有自动提示、缩进的功能,那是因为你安装的STS版本过低,因为 STS 3.7.0 才提供了
Spring Boot Yaml Editor
New in STS 3.7.0: Spring Boot Yaml Editor
The Spring Boot Yaml editor is built on top of YEdit. STS adds boot-specific content-assist, validation, hover-infos and hyperlink detectors.
就像 In STS 3.6.4 we introduced “.properties” editor support, for editing Spring Boot configuration properties.
官网地址: https://spring.io/blog/2015/05/11/new-in-sts-3-7-0-spring-boot-yaml-editor
看了很多关于安装STS插件的博文,上面写的一步一步的都能安装成功,但是忽略了一点,就是看你博文的人的本地开发环境,
以及没有指明STS插件从哪个版本开始支持Yaml Editor, 所有才会有根据Eclipse版本下载相应的STS插件,安装成功后,编辑yml文件还是没有提示,高亮显示,语法检查等.....
在此,我写明,要想让你的Eclipse 在编辑yml文件时有以上功能,你的Eclipse版本至少为 Eclipse 4.5 (Mar)
要想让你的Eclipse在编辑application.properties文件有提示功能,你的Eclipse版本至少为Eclipse 4.4.2(Luna)
好吧,如果你本地安装的JDK为1.7 ,不想安装JDK1.8 。那么你只需下载Eclipse 版本 需要 大于4.5 而小于 4.6
因为Eclipse 4.6 需要JDK1.8
我本地是JDK1.7 那就下载 STS3.7.0 对应的Eclipse版本 Eclipse 4.5
sts-3.8.3的下载地址:http://download.springsource.com/release/TOOLS/update/3.8.3.RELEASE/e4.6/springsource-tool-suite-3.8.3.RELEASE-e4.6.2-updatesite.zip
sts-3.8.2的下载地址:http://download.springsource.com/release/TOOLS/update/3.8.2.RELEASE/e4.6/springsource-tool-suite-3.8.2.RELEASE-e4.6.1-updatesite.zip
sts-3.8.1的下载地址:http://download.springsource.com/release/TOOLS/update/3.8.1.RELEASE/e4.6/springsource-tool-suite-3.8.1.RELEASE-e4.6-updatesite.zip
sts-3.8.0的下载地址:http://download.springsource.com/release/TOOLS/update/3.8.0.RELEASE/e4.6/springsource-tool-suite-3.8.0.RELEASE-e4.6-updatesite.zip
sts-3.7.3的下载地址:http://download.springsource.com/release/TOOLS/update/3.7.3.RELEASE/e4.5/springsource-tool-suite-3.7.3.RELEASE-e4.5.2-updatesite.zip
sts-3.7.2的下载地址:http://download.springsource.com/release/TOOLS/update/3.7.2.RELEASE/e4.5/springsource-tool-suite-3.7.2.RELEASE-e4.5.1-updatesite.zip
sts-3.7.1的下载地址:http://download.springsource.com/release/TOOLS/update/3.7.1.RELEASE/e4.5/springsource-tool-suite-3.7.1.RELEASE-e4.5.1-updatesite.zip
sts-3.7.0的下载地址:http://download.springsource.com/release/TOOLS/update/3.7.0.RELEASE/e4.5/springsource-tool-suite-3.7.0.RELEASE-e4.5-updatesite.zip
具体安装步骤:点击打开链接
此时,在编辑yml文件时,就会有提示及其高亮显示。