Spring xml configuration automatically prompts - reproduced https://blog.csdn.net/sinat_18474835/article/details/79370629

To Spring2.0 example:

download link:

CSDN:

http://download.csdn.net/download/hh775313602/9812757

No credit can go to Baidu network disk download, I have shared:

http://pan.baidu.com/s/1nv9bb1f

 

The first step, first see what is under your Eclipse version, follow these steps:

 

1.1 Eclipse menu click on 'Help -> About Eclipse', as shown below:

Click on the icon below 1.2 Eclipse, see Oh, do not point wrong, as shown below:

 

1.3 find the back of the Eclipse Platform Version, can be seen at my Eclipse version is 4.3.2

 

Step 2: Install Spring plug installation here online, for example, you may want to install their own offline check the Internet method

 

 

2.1 Eclipse menu click on 'Help -> Install New Software ....', As shown below:

 

 

 

2.2 enter the URL http://dist.springsource.com/release/TOOLS/update/e4.3/, Eclipse is the final version 4.3, and then press the Enter button, as shown below:

 

 

 

2.3 choose to install the plug-in, check SpringIDE can only recommend, a total of four, as shown below. Then click 'Next'. As shown below:

 

 

 

2.4 Eclipse will look for it, wait for a while, and then continue to click 'Next' to the following chart:

 

 

 

2.5 Continue to click 'Next', as shown below:

 

 

 

2.6 Select I accepte the termsof the license agreements, then click the 'Finish' button, as shown below:

 

 

 

This time Eclipse 2.7 will be installed in the background, in the lower right corner you can see the installation progress, please be patient.

Ps: If the installation process fails, you can try more than once, do not be discouraged Oh

 

安装好后,会提示让重启Eclipse,点击确定即可。

 

 

第三步:

但是,到现在为止,可以出来类包名的提示,但是输入.不会自动出来,需要按Alt+/ 才行,所以还需要再设置一下,方法如下:

 

3.1 点击Eclipse菜单‘Window-> Preferences’ ,如下图:

 

3.2 依次点开菜单 ‘XML -> XMLFiles -> Editor -> Content Assist’,如下图:

 

 

点开后,修改两个地方:

1.      把Auto activation delay(ms):改为0

2.      在Prompt when these characters are inserted输入框内增加一个英文的点

如下图所示:

 

至此,大功告成了,快去找个xml文件试试吧!

 

另外要注意一下xml的打开方式。今天试了一下,打开方式为Spring Config Editor和XML Editor的时候,是可以自动提示的。但是在一些其它的编辑器里面,可能自动提示就不好使了。所以,如果碰到自动提示不好使的情况,就修改一下打开方式。如下图所示:

 

 

 

最后,建议配置一下Spring的xsd

 

配置方式如下:

 

1.点击Eclipse菜单‘Window –>Preferences’,如下图

 

 

 

2.依次点开 XML -> XMLFiles,在右侧点击一下‘User Specified Entries,然后点击‘Add…’按钮,如下图:

 

 

 

3.点击 ‘File System…’按钮,找到spring-beans-2.0.xsd文件打开,如下图:

 

 

文件在spring-framework-2.0/dist/resources里面,如下图:

 

 

 

 

 

4      修改一下Key,找后面加上’/spring-beans02.0.xsd’,最终为’

http://www.springframework.org/schema/beans/spring-beans-2.0.xsd

 

如下图,最后点击OK。

 

4.点击‘OK’最终完成,如下图:

Guess you like

Origin www.cnblogs.com/asndxj/p/11359847.html