模板配置样例
<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"
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">
<!-- <bean id="student" class="com.leige.domain.Student" />-->
<context:annotation-config/><!--这一句必须写,表示启用spring注解-->
<bean id="personDao" class="com.leige.dao.impl.PersonDaoimpl"></bean>
<bean id="personService" class="com.leige.service.PersonService"></bean>
</beans>
上面红色的三项,一定要和你的spring版本号对应,这样才可以在xml文件中显示提示信息,天机xsd文件,在window--》prefeerence-》myEclipse->fileandEdit->xml->xmlcatlog->add
这样就会显示提示信息