SpringBoot的properties文件不能自动提示解决方法

一、Eclipse

解决方法:Eclipse中安装Spring Tools Suite(STS)。

这里采用离线安装的方式。

1. 官网:https://spring.io/tools3/sts/all

注意:sts的版本需要与你的eclipse对应

查看历史版本,我的eclipse是4.5.2,所以对应的sts版本是:

#3.7.3.RELEASE是要下载的sts的版本
#e4.5是eclipse的主版本,e4.5.2是eclipse的次版本
#可以在官网中查看sts与eclipse的版本对应关系,然后拼接下载的URL
https://download.springsource.com/release/TOOLS/update/3.7.3.RELEASE/e4.5/springsource-tool-suite-3.7.3.RELEASE-e4.5.2-updatesite.zip

2. 安装

打开eclipse,Help->Install New Software

 

然后一直Next,完成安装,重启eclipse。

3. 查看是否安装

Window->Show View->Other,查看是否有Spring组件,有则表明我们已经安装成功了。

4. 用Spring Properties Editor编辑器打开对应文档,文档右键---> OpenWith -->Spring Properties Editor

二、Intellij IDEA

 File->Settings->Editor->File Types 的Registered Patterns里面添加*.properties,让IDEA把properties文件看做spring文件来处理。

 

posted @ 2019-09-14 11:48  codedot  阅读(3228)  评论(0编辑  收藏  举报