Spring is a design-level framework for open source, which solves the problem of loose coupling between the business logic layer and other layers, so it runs the interface-oriented programming concept throughout the system Application . Spring was a lightweight Java development framework that emerged in 2003 and was created by Rod Johnson. In short, spring is a layered javase/ee full-stack (one-stop) lightweight open-source framework.
Characteristics
1. Easy to decouple and simplify developmentWith the IOC container provided by spring, we can control the dependencies between objects by spring, avoiding excessive program coupling caused by hard coding. With spring, users no longer have to write code for these very low-level requirements, such as single-instance pattern classes, attribute file parsing, and can focus more on upper-tier applications.
support for 2.AOP programmingThe AOP functionality provided by spring facilitates aspect-oriented programming, and many features that are not easily implemented with traditional OOP can be easily coped with by AOP.
3. Support for declarative TransactionsIn spring, we can get rid of the tedious transaction management code, make the transaction management with the declarative way, improve the development efficiency and quality.
4. Convenient program TestingAlmost all of the testing can be done with non-container-dependent programming, and in spring, testing is no longer an expensive operation, but something that can be done at hand. For example, Spring supports JUNIT4, which can be easily tested with annotations for spring programs.
5. Easy integration of various excellent frameworksSpring does not exclude a variety of excellent open source frameworks, instead, spring can reduce the difficulty of using various frameworks, and spring provides direct support for a variety of excellent frameworks such as Struts,hibernate, Hessian, Quartz, etc.
6. Reduce the difficulty of using Java EE APIsSpring provides a thin layer of packaging for many of the hard-to-use Java EE APIs, such as Jdbc,javamail, remote invocation, and so on, and the ease of use of these Java EE APIs is greatly reduced by spring's simple encapsulation.
7.Java Source code is a classic learning paradigmSpring's source code design is exquisite, the structure is clear, the originality, everywhere manifests the master to the Java design pattern flexible use as well as to the Java Technology Advanced attainments. The spring framework source code is undoubtedly a best practice example of Java technology. If you want to quickly improve your Java technology and application development level in a short period of time, learning and studying spring source code will make you receive unexpected results. To sum up, spring has the following advantages: 1. Low-intrusive design, code pollution is very low 2. Independent of the application server, the spring framework-based application can truly implement write Once,run anywhere commitment 3. Spring's di mechanism reduces the complexity of business object substitution and improves decoupling between components 4.Spring AOP support allows for centralized management of some common tasks such as security, transactions, logs, and so on, providing better reuse 5. Spring's ORM and DAO provide good integration with the third-party persistence layer framework and simplify the underlying database access 6.Spring does not force the application to rely entirely on spring, and the developer is free to select part or all of the spring framework
First, Spring introduction