One, XML file to add automatic prompt function
The automatic prompts for XML files require you to import different related XSD files, and the following is a common beans and context to describe the configuration methods.
1.xml file Add Beans Auto Prompt feature
Eclipse Window Selection
Window–preferences–myeclipse–xml–xml Catalog
Select User Specified entries and click Add
Location: Add the path where the Spring-beans-2.5.xsd file is located
Key Type: Select Schema location
Key: Auto Populate
After confirmation that there is a hint as shown,
2. xml file Add context Auto prompt feature
Similarly
Import related XSD files
If you want to use it, add the following words to the XML file.
<pre name= "Code" class= "JavaScript" >xmlns:context= "Http://www.springframework.org/schema/context"
http ://www.springframework.org/schema/context
http://www.springframework.org/schema/context/ Spring-context-2.5.xsd
<context:annotation-config/>
<span style= "FONT-SIZE:18PX;" ><strong><span style= "color: #ff00;" ></textarea></span></strong></span>
As pictured,
Second, Java file and note automatic prompts
Success. General Java file hints as shown in the diagram,
Note the hint function as shown in the diagram,
However, using the annotation annotation feature also adds a few words to the XML configuration file.
Use annotation must add four sentences as follows,
<pre name= "code" class= "HTML" >xmlns:context= "Http://www.springframework.org/schema/context"
http:// Www.springframework.org/schema/context http://www.springframework.org/schema/context/ Spring-context-2.5.xsd
<context:annotation-config/>
As pictured,
<?xml version= "1.0" encoding= "UTF-8"?> <beans xmlns=
"Http://www.springframework.org/schema/beans"
xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance"
xmlns:context= "http://www.springframework.org/ Schema/context "
xmlns:aop=" HTTP://WWW.SPRINGFRAMEWORK.ORG/SCHEMA/AOP "
xsi:schemalocation=" http:// Www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
Http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/ Spring-context-2.5.xsd
HTTP://WWW.SPRINGFRAMEWORK.ORG/SCHEMA/AOP
Http://www.springframework.org/schema /aop/spring-aop-2.5.xsd ">
<context:annotation-config/>
<context:component-scan Base-package= "COM.BJSXT"/>
<aop:aspectj-autoproxy/>
The premise of using a different annotation is that the corresponding jar package has already been imported, and different annotations will be imported in different packages, for example,
@RequestMapping Correspondence Spring-web-3.2.8.release.jar
@Aspect corresponds to Aspectjweaver-1.6.9.jar and Aspectjrt-1.6.9.jar.
The specific version seems to be indifferent, I chose the time is to find the local library version of the latest, it seems that the version of inconsistency is not too much impact