spring用注解的方式实现属性装配



beans.xml:

<?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"
       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">
           
           <!-- 打开spring的注解功能 -->
           <context:annotation-config/>
</beans>



posted @ 2012-07-29 17:17  xzf007  阅读(134)  评论(0编辑  收藏  举报