"Spring Source depth analysis" a

Spring overall architecture

"Spring Source depth analysis" a

1.1 Spring overall architecture

1.1.1 Core Container:

Modules: Core, Beans, Context and Expression Language

Core: base portion of the frame, to provide IOC and dependency injection characteristics. Also includes core tools.
The BeanFactory concept is based, which provides the Classical factory mode program to eliminate the need for singletons and allows you really separated dependencies and program logic from the configuration.

Bean: contains an access profile, create and manage bean as well as IoC / DI operations related to all classes

Context: there is provided a filter similar to the JNDI registered object access method for frame-
key ApplicationContext interface module is Context

Expression Language: expression language provides
support set / get the value of the property, call distribution properties, methods, accessing the array context (accessiong the context of arrays), the index and the container, a logical and arithmetic operators, and named variables from Spring IoC container to retrieve objects by name. It also supports the projector list, selection list and general polymerization.

1.1.2 Data Access/Integration

Module: JDBC, ORM, OXM, JMS and Transaction

JDBC: JDBC abstraction layer provides

ORM: Providing the interactive layer such as JPA / JDO / Hibernate / ibatis

OXM: one pair provides an abstraction layer Object / XML mapping implemented, including JAXB, Castor, XMLBeans, JiBX and XStrearn

JMS: contains some manufacturing and consumer information and features

Transaction: supports transaction management and declarative programming

1.1.3 Web

Module: Web, Web-Servlet, Web-Structs (deprecated) and Web-Porlet

Web: provides a foundation for Web integration features, such as multi-file upload, initialize the IoC container using servlet listeners and a Web-oriented application context

Web-Servlet: MVC realization

Web-Porlet: provides Porlet and Web-Servlet module of the MVC implementation

1.1.4 AOP

Module: Aspect, Instrumentaion

Aspect: provides integrated support for AspectJ's

Instrumentaion: provides class instrumentation support and classloader implementation, which can be used on a particular application server

1.1.5 Test

It supports the use of JUnit and Spring components to be tested Test'NG

1.2 added:

AspectJ fairy operations:

helloWorld example:

"Spring Source depth analysis" a

Increase the transaction:

"Spring Source depth analysis" a

Compile:

"Spring Source depth analysis" a

Output:

"Spring Source depth analysis" a

 

Guess you like

Origin www.cnblogs.com/mxb0611/p/11926846.html