By factory pattern reflection profiles + + achieve decoupling procedure.
<bean id="us" class="com.user">
class FactoryBean{
public static object getBean(String id ){
........
By reflecting the implementation class ID
}
}
userService us = FactryBean.getBean (us); userService obtaining a class object is achieved. UserService such an interface is not implemented class of coupling, and is not coupled factory class.