spring IOC principle underlying implementation

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.

Guess you like

Origin blog.csdn.net/song_chengbo/article/details/97388040