<?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-3.0.xsd
http://www.springframework.org/schema/context 
    http://www.springframework.org/schema/context/spring-context-3.0.xsd"
>

    
<!-- a service object; we will be profiling its methods -->
    
<!-- 指定bean名称时可以使用id或者name来指定,主要区别是name可以用特殊字符(少用) -->
    
<bean name="u" class="com.bebig.dao.impl.UserDAOImpl" />
    
<!-- id也可以指定bean名称 -->
    
<bean id="userService" class="com.bebig.service.UserService">
        
<constructor-arg>
            
<ref bean="u" />
        
</constructor-arg>
    
</bean>

</beans>