Introduction to spring framework: (a) Spring Framework

A concept, spring framework

Spring is an open source lightweight Inversion of Control (IoC) and section (AOP) for the container frame, which consists of Rod Johnson created. It is designed to address the complexity of enterprise application development created. Spring uses basic JavaBean to do things previously only possible done by EJB. However, Spring's use is not limited to server-side development. Any Java application can benefit from the simplicity, testability and loose coupling from the perspective of Spring.

Constituting two, spring frame

            

1, the core container (Core Container)

  • Beans (Bean module) provides BeanFactory, it is complicated to achieve a factory mode.
  • Core (core module) provides the basic part of the frame, and comprising IoC dependency injection function.
  • Context (context module) built on the solid foundation provided by the core module and the Bean, it is the media's access to any object definitions and configuration. ApplicationContext interface is the focus of the context of the module.
  • spEL (expression language module) provides querying and manipulating an object graph of powerful expression language at runtime.

2, Aspect Oriented Programming (AOP, Aspect Oriented Programming)

  • AOP (AOP module) provides aspect-oriented programming, a method that allows you to define the entry points of the interceptors and cleanly decouple code, which implements the functions should be isolated.
  • Aspects (Aspects module) provides integration with AspectJ, which is a powerful and sophisticated aspect-oriented programming (AOP) framework.

3, the data access / Integration (Data Access / Integration)

  • JDBC (JDBC module) provides a JDBC abstraction layer removing redundant JDBC-related coding.
  • ORM (ORM block) as the object-relational mapping API popular, including JPA, JDO, Hibernate and iBatis, provides an integrated layer.
  • JMS (JMS Module) includes the production and consumption of functional information.
  • Transaction (Transaction Module) is a class that implements a special interface and all of POJO support programmatic and declarative transaction management.

4, web module

  • WebSocket (WebSocket module) provides support for the WebSocket-based, but also provides two ways of communication between the client and the web server application.
  • Servlet (Web module) provides basic web-oriented integration functions, such as multiple file upload function and using a servlet context listener and oriented web application to initialize IoC container.
  • Model Web (Web-mvc Module) contains the Spring - View - Controller (MVC), to achieve a web application.

5, the test module

  • Text (test modules) having a support testing of JUnit or TestNG Spring assembly frame.

Three, spring framework for action

1, to simplify application development framework for enterprise-class application development

2, decoupling, spring to help us manage the dependencies between objects, low coupling between such objects, easy to maintain code.

3, the integrated other frameworks, such as: mybatis, hibernate, struts2 frame like fashion.

Refer to the official document: https://docs.spring.io/spring/docs/4.3.9.RELEASE/spring-framework-reference/html/

Published 134 original articles · won praise 10 · views 7361

Guess you like

Origin blog.csdn.net/yu1755128147/article/details/103534514