Spring基础学习注记
Spring是轻量级的,AOP的,DI的,框架的,容器的
轻量级:体积(2.5M),开销
DI:通过DI来松耦。所谓依赖注入,即组件之间的依赖关系由容器在运行期决定,形象的来说,即由容器动态的将某种依赖关系注入到组件之中
AOP:理解为“切面”比较合适,AOP则是针对业务处理过程中的切面进行提取,它所面对的是处理过程中的某个步骤或阶段,以获得逻辑过程中各部分之间低耦合性的隔离效果。OOD/OOP面向名词领域,AOP面向动词领域。AOP还有另外一个重要特点:源码组成无关性。
容器的:负责AO的lifecycle和configuration。可以定义AO如何被创建、如何配置和如何相互关联。
框架:配置和组合应用,管理AO,通过XML配置,并提供很多基础设施服务,比如事务管理,持久化框架集成。
Spring’s core container:提供基本功能,包括BeanFactory(DI的基础,spring框架的基础)。
Application context module:core使spring像个容器,而context则使其像一个框架。常用的一个应用就是集成velocity和freemarker的一个集成点。
Spring’s AOP module:顾名思义。
JDBC abstraction and the DAO module:集成数据库操作。这个模块会利用AOP模块提供的事务管理功能。
Object-relational mapping (ORM) integration module:在DAO的基础上提供ORM的solution。Spring不实现自己的ORM,只是提供一个与ORM框架结合的接口,比如Hibernate,JPA,JDO,IBATIS等。同样spring的事务管理也与这些框架相结合。
Java Management Extensions (JMX):Exposing the inner workings of a Java application for management is a critical part of making an application production ready. Spring’s JMX module makes it easy to expose your application’s beans as JMX MBeans. This makes it possible to monitor and reconfigure a running application.
Java EE Connector API (JCA)
The enterprise application landscape is littered with a mishmash of applications
running on an array of disparate servers and platforms. Integrating these applications
can be tricky. The Java EE Connection API (better known as JCA) provides a
standard way of integrating Java applications with a variety of enterprise information
systems, including mainframes and databases.
In many ways, JCA is much like JDBC, except where JDBC is focused on database
access, JCA is a more general-purpose API connecting to legacy systems. Spring’s
support for JCA is similar to its JDBC support, abstracting away JCA’s boilerplate
code into templates.
The Spring MVC framework
- <script type="text/java script">BAIDU_CLB_fillSlot("771048");
- 点击复制链接 与好友分享! 回本站首页 <script> function copyToClipBoard(){ var clipBoardContent=document.title + '\r\n' + document.location; clipBoardContent+='\r\n'; window.clipboardData.setData("Text",clipBoardContent); alert("恭喜您!复制成功"); }