First, spring overview
1. What is Spring?
Spring is a layered Java se/ee application Full-stack lightweight Open-source framework, with IOC (inverse of control: inversion controls) and AOP (Aspect oriented programming: plane-oriented programming) as the kernel, It provides a wide range of enterprise-class applications such as the presentation Layer Spring MVC and persistent layer spring JDBC and business layer transaction management, as well as the integration of the many famous third-party frameworks and class libraries in the open source world, becoming the most used open source framework for Java EE Enterprises.
2, Spring's development history
1997 IBM put forward the idea of EJB
1998, Sun developed the development standard specification EJB1.0
1999, EJB1.1 released
2001, EJB2.0 released
2003, EJB2.1 released
2006, EJB3.0 released
Rod Johnson (father of Spring)
Expert one-to-one-ee Design and Development (2002)
This paper expounds the advantages and solutions of the development and design of Java EE using EJB.
Expert one-to-one EE development without EJB (2004)
This paper expounds how to solve the problem of not using EJB in Java EE Development (Spring prototype)
3. Spring Architecture
4.Spring brings benefits
Easy decoupling for simplified development
Through the IoC container provided by Spring , dependencies between objects can be controlled by Spring , avoiding excessive program coupling caused by hard coding. Users also no longer have to write code for these very low-level requirements, such as singleton pattern classes, attribute file parsing, and so on, which can be more focused on upper-tier applications.
support for AOP programming
With Spring 's AOP capabilities, it facilitates aspect-oriented programming, and many features that are not easily implemented with traditional OOP can be easy to cope with.
Support for declarative Transactions
We can free ourselves from the tedious transaction management code, and make the management of the transaction in a declarative way to improve the efficiency and quality of the development.
Easy testing of programs
Almost all of the testing work can be done in a non-container-dependent way, and testing is no longer an expensive operation, but something that can be done at your fingertips.
Easy integration of a variety of excellent frameworks
Spring can reduce the difficulty of using various frameworks, providing a variety of excellent frameworks (Struts,Hibernate,Hessian , Quartz and so on) direct support.
Reduce The difficulty of using Java EE APIs
Spring provides a thin layer of packaging for Java EE APIssuch as JDBC,JavaMail, remote calls, and so on, making these The use of APIs is greatly reduced.
Java Source code is a classic learning paradigm
Spring 's source code design is exquisite, the structure is clear, the ingenuity uses, everywhere manifests the master to the Java design pattern flexible use as well as to the Java Technology advanced attainments. Its source code is not intended to be an example of best practices in Java technology.
5. Spring Resources
5.1
, download the Development Resource Pack
Official website: http://spring.io/
Introduction to 5.2andSpring resource Bundles
5.3, description of the resource bundle
the latest Spring Framework official version is 4.3.2. But what can be downloaded is 3.2, which is the last official resource bundle for this version of Spring3. The later versions were all integrated with MAVEN .
The version that Spring relies on for third-party resource bundles to download is 3.0.2. The back is also integrated into MAVEN .
6
, build the Spring Core development environment
6.1
, copy the most basic core jar Package
6.2, Core-dependent jar Package (log output)
commons-logging or log4j: Use whichever is OK.
6.3.Springthe configuration file: based onXMLor the way annotations are
03spring-01spring Overview of Java Combat