1.ʲôIOC
2.дʹSpring Ĳ  дؼúʹ
3.Spring ַʽ дӦ÷ʽ
4.дbeanļйؼ    bean ʼӦĹؼ
   beanٹؼ    beanӳʵӦĹؼ
----------------------------------------------------------------------------
1.ʲôDI
  Dependence  Injection   ע(DIIOCһ־ʵ)  
          ֮װ 
2.Springעʵַʽ  
  2.1 setter ע   10
         set ע
    <bean id="cardb"  class="com.xdl.bean.Card">
	     <property name="suits" value="" ></property>
	     <property name="point" value="K"></property>
	</bean>     
  2.2 ע  7
         ڹ췽ע
    <bean  id="cardc" class="com.xdl.bean.Card">
	     <constructor-arg  index="0" value="÷"></constructor-arg>
	     <constructor-arg  index="1" value="Q"> </constructor-arg>
	</bean>
  2.3 Զע  4
   	bean  ʹ autowire Խָ    ȡֵ 
   	byName   Spring id Զ  Ƿͬ  
	byType   Ե в  ǲҪжֵ 򱨴
	constructor    byType  ͳͻʱ byName(β)
	autodetect    ڰ汾 ڷ
	              
 3.beanע
   3.1 ԱӦļֵ 
      ַ       ... 
      <bean  id="card" class="com.xdl.bean.Card">
   	       <property name="suits"  >
   	            <value>Ƭ</value>
   	       </property>
   	       <property name="point"  >
   	             <null></null>
   	       </property>
   	 </bean>
       ϰ:
       Spring дһӳض   ͨSpring ȡӳض 
       Ȼͨӳض ȡݿ
   3.2 Ա ӦĶֵ 
     ref="beanid"
   3.3 beanһ 
   עһList    
     <property  name="friends">
           <list>  
                <value> ֵ1 </value>
                <value> ֵ2</value>
           </list>
     </property>
  עһSet    
     <property  name="friends">
           <set>  
                <value> ֵ1 </value>
                <value> ֵ2</value>
           </set>
     </property>  
 עһMap 
       <property name="phones">
   	          <map>
   	               <entry key="15811999988" value="С"></entry>
   	               <entry key="15811009988" value="С"></entry>
   	               <entry key="15811009999" value="С"></entry>
   	               <entry key="15820182018" value="С"></entry>
   	               <entry key="15820182018" value="СС"></entry>
   	          </map>
   	   </property>
עһProperties 
      <property name="phones2">
   	          <props>
   	               <prop key="15811999986"  >ŷ</prop>
   	               <prop key="15811999987"  ></prop>
   	               <prop key="15811999988"  ></prop>
   	               <prop key="15811999989"  ></prop>
   	               <prop key="15811999980"  >ԣ</prop>              
   	          </props>
   	     </property>
  4.ϲĵ
    <util:list  id="">
        <value> </value>
    </util:list>  
    <util:set  id="">
        <value> </value>
    </util:set>
    <util:map  id="">
        <entry  key=""  value="" />
    </util:map>
    <util:properties id="" >
        <prop key="">ֵ </prop>
    </util:properties>
    .properties  Ժ͵ԼϹ 
    <util:properties id=""  location="classpath:src·ļ">
    </util:properties>
  5.Spring ELʽ 
    ԭELʽе$#  ȡSpringжֵ
  
  6.ɨ
    6.1 ʲôɨ 
     Spring ṩһ ԰д Լװıע(ע)
          ּԴxml á
    6.2 ɨʹò
     1.һ SpringӦļ  jar(IOCAOP)
     2.Spring Ӧļпɨ
     <context:component-scan   base-package=""  />
     3.ڽjavaʱ ҪjavaϴӦıע 
     @Component   ͨע
     @Repository  ־ûע
     @Service   ҵע
     @Controller Ʋע
     4.Spring  лȡӦ 
     


     
     
     
     
     
     
     
     
     
        
  
  
   	     
   	     
   	     
   	     
   	     
   	      	     
   	     
 
 
 
   
   
   
   
   
   
   
   
   
    
   
   
   
     
   
    	 
   	 
   	             
          
          
          
          
          
          