The aspectj directory uses the source code and test program file of aspectj under the Spring framework.
Aspectj is the earliest application framework for providing AOP in Java.
The Dist directory contains the spring release package. The release package is described in detail below.
The docs directory contains related documents, including javadoc with spring API, reference Reference Guide, spring label library usage file, and MVC-step-by-step instructions and examples of spring MVC. They are all good documents. It is worth studying.
The lib directory is the third-party open source package on which spring depends.
The mock directory is the mock source program for spring-assisted application testing.
The sample source code of spring and sample configuration of the simple webapp sample framework under the samples directory are worth learning about jpetstore and petclinic, of course, other countries, imagedb, and tiles-example can also be referenced.
The src directory is the source program of spring.
Spring unit test source program under the test directory.
The tiger directory is for source programs and test programs that use Java 1.5 in the Spring framework. Tiger is the development code of JDK 1.5.
Other files in the root directory are compilation and description files.
2. Spring Package Structure Description
Next, let's talk about the jar package in the DIST directory in detail. Understanding this helps us reduce the size of the release package and increase our understanding of the spring architecture.
Spring. jar is a single jar package that contains a complete release module. But does not include mock. jar, aspects. jar, spring-portlet.jar, and spring-hibernate2.jar.
Spring-src.zip is all the source code compressed package.
Except spring. JAR file. Spring also includes 21 other independent jar packages, each containing the corresponding spring components. You can choose to combine your own jar packages as needed, instead of introducing the entire spring. jar.
Spring-core.jar (required)
This jar file contains the basic core tool class of the Spring framework. Other components of spring must use the class in this package, which is the basic core of other components. Of course, you can also use these tool classes in your own application system.
The external dependency is commons logging (log4j ).
Spring-beans.jar (required)
This jar file is used by all applications. It includes access configuration files, creation and management of beans, and inversion of control/dependency injection (IOC/di) all operation-related classes. If the application only requires basic IOC/di support, introduce spring-core.jar and spring-beans.jar files.
The external dependency is spring-core, (cglib ).
Spring-aop.jar (required)
This jar file contains the class and source code-level metadata support required when spring's AOP feature is used in applications. Use spring features based on AOP, such as declarative transaction management, to include the jar package in the application.
The external dependency is spring-core, (spring-beans, AOP alliance, cglib, commons attributes ).
Spring-context.jar (required)
This jar file provides a large number of extensions for the spring core. You can find all the classes required to use the spring applicationcontext feature, all the classes required by jdni, the instrumentation component, and related classes for validation.
The external dependency is spring-beans (spring-AOP ).
Spring-dao.jar (required)
This jar file contains all classes for data access by spring Dao and Spring transaction. To use declarative transaction support, you also need to include spring-aop.jar in your own applications.
The external dependency is spring-core, (spring-AOP, spring-context, jta api ).
Spring-jdbc.jar (required)
This jar file contains all classes that encapsulate spring's JDBC data access.
The external dependency is spring-beans and spring-Dao.
Spring-support.jar (required)
This jar file contains classes that support UI templates (velocity, freemarker, jasperreports), email service, script Service (jruby), cache (ehcache), and Task Plan Scheduling (uartz.
External Dependency on spring-context, (spring-JDBC, velocity, freemarker, jasperreports, bsh, groovy, jruby, quartz, ehcache)
Spring-web.jar (required)
This jar file contains the core classes required to use the Spring framework for Web application development, this includes automatic loading of Web application context features, Struts and JSF integration classes, file upload support classes, filter classes, and a large number of tool-assisted classes.
The external dependency is spring-context, Servlet API, (jsp api, jstl, commons fileupload, cos ).
Spring-webmvc.jar
This jar file contains all classes related to the spring MVC framework. Includes the framework Servlets, Web MVC Framework, controller and view support. Of course, if your application uses an independent MVC framework, you do not need any classes in the jar file.
The external dependency is spring-web, (spring-support, tiles, itext, poi ).
Spring-portlet.jar
A framework similar to spring MVC implemented by spring itself. Includes an MVC Framework and controller.
The external dependency is spring-web and Portlet API (spring-webmvc ).
Spring-struts.jar
Struts framework support makes it easier to integrate the Struts framework.
The external dependency is spring-web and struts.
Spring-remoting.jar
This jar file contains classes that support EJB, remote call remoting (RMI, Hessian, burlap, HTTP invoker, JAX-RPC.
External Dependency spring-AOP, (spring-context, spring-web, Hessian, burlap, JAX-RPC, ejb api ).
Spring-jmx.jar
This jar package provides support classes for JMX 1.0/1.2.
External dependencies include spring-beans, spring-AOP, and JMX APIs.
Spring-jms.jar
This jar package provides support classes for JMS 1.0.2/1.1.
External dependencies include spring-beans, spring-Dao, and JMS APIs.
Spring-jca.jar
Support for JCA 1.0.
The external dependency is spring-beans, spring-Dao, and JCA APIs.
Spring-jdo.jar
Support for JDO 1.0/2.0.
The external dependency is spring-JDBC, jdo api, (spring-Web ).
Spring-jpa.jar
Support for JPA 1.0.
The external dependency is spring-JDBC, jpa api, (spring-Web ).
Spring-hibernate2.jar
We do not recommend hibernate 2.1 Support.
The external dependency is spring-JDBC, hibernate2, (spring-Web ).
Spring-hibernate3.jar
Support for hibernate 3.0/3.1/3.2.
The external dependency is spring-JDBC, hibernate3, (spring-Web ).
Spring-toplink.jar
Support for the toplink framework.
The external dependency is spring-JDBC and toplink.
Spring-ibatis.jar
Support for ibatis SQL maps.
The external dependency is spring-JDBC and ibatis SQL maps.
The other two packages.
Spring-mock.jar
This jar file contains a complete set of mock classes of spring to assist in application testing. The Spring Test Suite uses a large number of mock classes, making testing easier. It is convenient to simulate the httpservletrequest and httpservletresponse classes in Web application unit testing. And provides support for JUnit.
The external dependency is spring-core.
Spring-aspects.jar
Provides support for aspectj so that you can easily integrate aspect-oriented functions into the IDE, such as Eclipse ajdt.
External Dependency.
Weaver jars (Dist/weavers) description.
Spring-agent.jar
Spring's instrumentationsavingagent (instrumentationloadtimeweaver) is a device proxy package. For more information, see the instrumentation function of jdk1.5.
External Dependency none (for use at JVM startup: "-javaagent: spring-agent.jar ").
Spring-tomcat-weaver.jar
Extends Tomcat classloader so that it can use the instrumentation (device) class.
External Dependency none (for deployment into Tomcat's "server/lib" directory ).