- org.springframework.context-3.1.0.M2.jar
- org.springframework.beans-3.1.0.M2.jar
- dist\org.springframework.core-3.1.0.M2.jar
- commons-logging-1.1.1.jar
- dist\org.springframework.asm-3.1.0.M2.jar
- dist\org.springframework.expression-3.1.0.M2.jar
- commons-beanutils-1.8.0.jar
- dom4j
- Introspector java.beans.Introspector
- ConvertUtils.convert("1232a", Integer.class); org.apache.commons.beanutils.ConvertUtils
<?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 "> <!-- for annotation should quote the three line above and a line below --> <context:annotation-config/> <!-- id can not been named as special character ,but name does --> <!-- 1. normal instance of bean--> <bean id="personService" class="beans.PersonServiceBean"> <property name="personDao" ref="personDao"></property> <property name="testName" value="James"/> <property name="sets"> <set> <value>a</value> <value>b</value> <value>c</value> </set> </property> <property name="lists"> <list> <value>a</value> <value>b</value> <value>c</value> <bean class="interfaces.PersonServiceFactory" /> <bean class="beans.PersonDaoBean"/> </list> </property> <property name="maps"> <map> <entry key="3" value="personDao"/> <entry key="1" value-ref="personDao"/> <entry key="2" value-ref="personDao"/> </map> </property> <property name="properties"> <props> <prop key="age">11</prop> </props> </property> </bean> <bean id="personDao" class="beans.PersonDaoBean"> </bean> <!-- 2. static factory instance of bean--> <bean id="personService2" class="interfaces.PersonServiceFactory" factory-method="createFactory"/> <!-- 3. factory instance of bean--> <bean id="personServiceFactory" class="interfaces.PersonServiceFactory"/> <bean id="personService3" factory-bean="personServiceFactory" factory-method="createFactory2"/> <!-- <bean id="personService3" factory-bean="personServiceFactory" factory-method="createFactory2" scope="prototype"/> --> </beans>
<?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 "> <!-- FOR AUTO INJECT IN CLASS FILES --> <context:component-scan base-package="beans"/> </beans>
- differences between Reflect and Introspector
- Automatically detecting classes and registering bean definitions
@Service @Repository @Controller
@Scope .....
double checked lock
http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html