Spring是一个综合的框架,包含了对DAO,Transaction、MVC、Remote,Security等相关技术的集成和支持
第一部分:对Spring进行概况的介绍:What is Spring?Features of Spring? why use Spring? What Spring can do?
What is Spring?
Spring is an open source framework,created by RodJohnson and described in his book Exper One-on-one:J2EE Design and Development;
Spring is a lightweight dependency injection and aspect-oriented container and framework.
Spring能够减少J2EE开发的复杂性,它提供了基于JavaBean的声明式编程,而之前,我们只能对Servlet、jsp、和EJB等进行声明式应用。
所谓的声明式编程,指的是通过配置XML或者使用annotation从而完成某些工作,例如Hibernate、Servlet等。
The Features of Spring
1.Lightweight:Spring is lightweight in terms of both size and overhead
2.Dependency Injection:Spring promotes loose couping through a technique known ad DI,and this also called IOC.
3.Aspect-oriented:separate application bussiness logic from system services
4.Container:Spring manages the lifecycle and configuration of application objects
5.framework
Spring对大量的企业级服务做了再一次的封装,简化了API,不用考虑细节问题。
Why use Spring?
1.Wiring of components (Dependency Injection)
Promotes/simplifies decoupling,design to interfaces ,TDD.
2.Declarative programming without J2EE
Easily configured aspects,esp,transaction support
3.Simplify use of popular technologies
Abstractions insulate application from specifics,eliminate redunadant code,and handle common error conditions.
Underlying technology specifics still accessible(closures)
Spring 除了提供上述的IOC和AOP之外,同时能够简化常用技术的使用,例如提供了对ORM和JDBC等数据访问方案的支持,提供了对MVC的集成,提供了远程访问解决方案的集成等
Spring包含了众多的模块,除了最基本的Spring core,Spring context和Spring AOP之外,其他模块的功能可以选择使用,也就是说,虽然Spring是一个一站式的解决方案,但是用户可以选择使用Spring中的某些功能,例如不使用Spring MVC ,而选择Struts MVC。
Spring's modules
根据上面的图形,我们很容易的看出spring的模块是由哪些组成的。现在,我们来详细的看看spring的各个模块
1.The core container
Spring's core container contains the BeanFactory,which is the fundamental Spring container and the basis on whick Spring's DI is bassed.
2.Application context module
This module extends the concept of BeanFactory.
3.AOP module
Spring provides rich support for aspect-oriented programming in its AOP module
4.DAO module
This module abstracts away the boilerplate code so that you can keep your database code clean and simple.
5.ORM integration module
Spring's ORM support builds on the DAO support,providing a convenient way to build DAOS for several ORM solutions.
6.Spring MVC framework
7.Remoting
Spring's remoting support enables you to expose the functionally of your Java objects as remote objects.
Serveral remoting options are available ,including RMI,Hessian,Burlap,JAX-RPC and Spring's own HTTP invoker
Spring 除了能够集成RMI、Hessian等远程解决方案,并提供了对JAX-RPC以及JAX-WS的支持
spring可以与很多已有技术集成使用,例如:Struts+spring+hibernate
- 大小: 97.2 KB
分享到:
相关推荐
org.springframework.asm-3.0.0.M4.jar: 提供对ASM(一个字节码框架)的简单封装 org.springframework.expression-3.0.0.M4.jar: spring表达式语言 org.springframework.test-3.0.0.M4.jar: spring提供的一个...
Spring Boot为Spring平台及第三方库提供开箱即用的设置,这样你就可以有条不紊地开始。多数Spring Boot应用只需要很少的Spring配置。 Spring Boot是由Pivotal团队提供的全新框架,其设计目的是用来简化新Sprin
(用户持久化类)重构第一步——面向接口编程 8 重构第二步——工厂(Factory)模式 9 重构第三步——工厂(Factory)模式的改进 10 重构第四步-IoC容器 11 控制反转(IoC)/依赖注入(DI) 11 什么是控制反转...
少儿编程-少儿编程系统-少儿编程系统源码-少儿编程管理系统-少儿编程管理系统java代码-少儿编程系统设计与实现-基于ssm的少儿编程系统-基于Web的少儿编程系统设计与实现-少儿编程网站-少儿编程网站代码-少儿编程平台...
少儿编程-少儿编程系统-少儿编程系统源码-少儿编程管理系统-少儿编程管理系统java代码-少儿编程系统设计与实现-基于ssm的少儿编程系统-基于Web的少儿编程系统设计与实现-少儿编程网站-少儿编程网站代码-少儿编程平台...
在对Spring框架的IoC容器进行全面介绍之后,将全面介绍Spring的面向切面编程(AOP)技术。Spring框架(Spring Framework)有自己的AOP框架,在概念上很容易理解,它成功地解决了Java企业编程中80%的AOP需求。 本文档...
在对Spring框架的IoC容器进行全面介绍之后,将全面介绍Spring的面向切面编程(AOP)技术。Spring框架(Spring Framework)有自己的AOP框架,在概念上很容易理解,它成功地解决了Java企业编程中80%的AOP需求。 本文档...
JSF第一步--JSF+Spring+ Hibernate+AJAX编程实践 试读
本书力求全面介绍 Spring 框架,涵盖了 Spring 核心、测试、数据访问、Web 开发、响应式编程、系统集成及微服务等方面在内的共26 章的内容,可以说是 Spring 技术的“百科全书”。 同时,本书基于 Spring 5 版本来...
9.5.2. 第一个例子 9.5.3. 回滚 9.5.4. 为不同的bean配置不同的事务语义 9.5.5. <tx:advice/> 有关的设置 9.5.6. 使用 @Transactional 9.5.6.1. @Transactional 有关的设置 9.5.7. 插入事务操作 9.5.8. 结合AspectJ...
书中第一部分展示了Spring框架的两个核心特性:依赖注入和面向切面编程。第二部分以第一部分介绍的DI和AOP特性为基础,叙述了如何将这两个概念应用到应用程序的数据和业务层中。第三部分介绍了Spring构建 Web应用...
编程训练-编程训练系统-编程训练系统源码-编程训练管理系统-编程训练管理系统java代码-编程训练系统设计与实现-基于springboot的编程训练系统-基于Web的编程训练系统设计与实现-编程训练网站-编程训练网站代码-编程...
因为上传大小的限制,分为两部分上传,这是第二部分,第一部分会在评论中给出链接 绝对是spring攻略中文版第二版 Spring专家力作 理论与实践完美结合 问题描述→解决方案→实现方法 第一部分 核心概念 第1章 ...
书中第一部分展示了Spring框架的两个核心特性:依赖注入和面向切面编程。第二部分以第一部分介绍的DI和AOP特性为基础,叙述了如何将这两个概念应用到应用程序的数据和业务层中。第三部分介绍了Spring构建 Web应用...
书中第一部分展示了Spring框架的两个核心特性:依赖注入和面向切面编程。第二部分以第一部分介绍的DI和AOP特性为基础,叙述了如何将这两个概念应用到应用程序的数据和业务层中。第三部分介绍了Spring构建 Web应用...
因为上传大小的限制,分为两部分上传,这是第一部分,第二部分会在评论中给出链接 绝对是spring攻略中文版第二版 Spring专家力作 理论与实践完美结合 问题描述→解决方案→实现方法 第一部分 核心概念 第1章 ...