Web Technology 高级Web技术 Introduction to Spring Framework
deeper Web Technology 高级Web技术 Introduction to Spring Framework
Web Technology Spring Overview Spring是Rod主创的一个应用于J2E领域的轻量应用程序框架,其核心是一个 Oc容器以及AOP实现 Rod Johnson(Expert One-on-One J2EE Design and Development) ng Spring Web 为内为 Spring Web MVC Source lovel metadata Web Mvc Spring Context JSP/ expert one onone Spring DAO Apa inion context 2EE Development Vaidation JDBC suppo NNDL EJB support& Remoting without EJB Spring Ce an conta nor
Web Technology 2 Spring Overview Rod Johnson 《Expert One-on-One J2EE Design and Development》 ◼ Spring是Rod主创的一个应用于J2EE领域的轻量应用程序框架,其核心是一个 IOC容器以及AOP实现
Web Technology Spring's benefits Offering a lightweight JavaBean container that eliminates the need to write repetitive plumbing code such as lookups Providing an inversion of control framework that allows bean dependencies to be automatically resolved upon object instantiation Allowing cross cutting concerns such as transaction management to be woven into beans as"aspects"rather than becoming the concern of the business object Offering layers of abstraction on top of popular existing technologies such as jdbc and hibernate that ease their use and organize configuration management
Web Technology Spring’s benefits ▪ Offering a lightweight JavaBean container that eliminates the need to write repetitive plumbing code such as lookups ▪ Providing an inversion of control framework that allows bean dependencies to be automatically resolved upon object instantiation ▪ Allowing cross cutting concerns such as transaction management to be woven into beans as “aspects” rather than becoming the concern of the business object ▪ Offering layers of abstraction on top of popular existing technologies such as JDBC and Hibernate that ease their use and organize configuration management 3
Web Technology Spring Core a Spring's core container provides the fundamental functionality of the Spring framework a In this module you'll find Spring,s Bean Factory, the heart of any Spring- based application. A Bean Factory is an implementation of the factory pattern that applies loc to separate your application's configuration and dependency specifications from the actual application code ORM DAO Web Spring JDBC JEE Framework Integration Batis JMX Rich View Support JSPS FreeMarke AOP Spring Portlet MvC Spring AOP AspectJ integratic Core The loc container
Web Technology 4 Spring Core ◼ Spring’s core container provides the fundamental functionality of the Spring framework. ◼ In this module you’ll find Spring’s BeanFactory, the heart of any Springbased application. A BeanFactory is an implementation of the factory pattern that applies IoC to separate your application’s configuration and dependency specifications from the actual application code
Web Technology The Bean Factory Configuration mechanism for managing beans The most common is the Xml BeanFactory o Could theoretically be any type of configuration - XML <? xml version =1.0"encoding="UTF-8?> Properties File < DOCTYPE beans PUBLIC"-MSPRINGI/DTD BEAN/EN Database http://www.springframework.org/dtd/spring-beans.dtd"> <beans> LDAP <bean id=" class="> </bean> <bean id= class=> </bean> </beans>
Web Technology The Bean Factory ▪ Configuration mechanism for managing beans ▪ The most common is the XmlBeanFactory ▪ •Could theoretically be any type of configuration - – XML - – Properties File - – Database - – LDAP ▪ 5 <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> <beans> <bean id="..." class="..."> ... </bean> <bean id="..." class="..."> ... </bean> ... </beans>