Spring Framework 2.0 DI zuisener@gmail.com
Java Web Struts/Spring/iBATIS ibatis Spring 2
Spring 2.0: The Spring Experience 2006: 3
Seasar2 DIxAOP POJO XML 4
2.0 XML AspectJ AOP 1.x 5
DI
Bean 1. singleton prototype request session globalsession myscope 2. 3. 7
Bean singleton prototype 8
2.0 Bean singleton session 9
Bean singleton session singleton request session 10
<bean id= scopeservice class= jp.co.example.scopeservice scope= request > </bean> Bean session globalsession singleton prototype <aop:scoped-proxy/> singleton,prototype org.springframework.web.context.request. RequestContextListener 11
Bean Bean 12
Bean session Bean / session session 13
Bean thread 14
XML XML DTD XML 15
XML Spring XML <bean id= datasource class="org.springframework.jndi.jndiobjectfactorybean"> <property name="jndiname" value="jdbc/datasource"/> <property name="jndienvironment"> <props> <prop key="foo">bar</prop> <prop key= password">password</prop> </props> </property> </bean> 16
XML 2.0 <bean jee:jndi-lookup id= datasource class="org.springframework.jndi.jndiobjectfactorybean"> <property name="jndiname" value="jdbc/datasource"/> <property jee: name="jndienvironment"> <props> <prop key= username">user</prop> = <prop key= password">password</prop> = </props> </property> jee:jndienvironment> </bean> jee:jndi-lookup> 17
XML Bean 18
XML DI 19
DI 20
AOP - Answer Or Problem? -
AOP AOP AOP 22
AOP 23
24
AOP AOP AOP 25
AOP AOP AOP API / 26
AspectJ AOP @AspectJ XML AOP aop 27
AspectJ @AspectJ AspectJ5 Java AspectJ Spring 28
AspectJ XML XML aop @ 29
AOP 30
- Just Plain Cool -
Groovy Java JRuby JVM Ruby BeanShell Java
Bean Java 33
public interface AccountService { int getamout(string accountid); } require java include_class AccountService class AccountServiceMock < AccountService def getamount return 1000 end end Java JRuby 34
<lang:jruby id= accountservicemock script-source= classpath:accountservicemock.rb script-interfaces= AccountService refresh-check-delay= 1000 /> 35
GUI 36
37
The Spring Experience 2006
The Spring Experience 2006 Interface21 Spring 2006 12 2005 700 39
The Spring Experience 2006 BEA Oracle Sun 40
The Spring Experience 2006 InfoQ DI, AOP InfoQ Java/.NET/Ruby 41
Spring 21 Simple Object 42
Spring 21 DI AOP PSA (Portable Service Abstractions) Spring Remote DB AP 43
DIxAOP 44
Spring J2EE 45