Spring. jar is a single jar package that contains the complete release, Spring. jar contains all the contents of the jar package except the content contained in the Spring-mock.jar, because the Spring-mock.jar is used for auxiliary testing only in the development environment, these classes are not allowed in formal application systems.
Except Spring. jar file. Spring also includes 13 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.
1. Spring-core.jar
This jar file contains the basic core tool class of the Spring framework. Other Spring components 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 application system.
2. Spring-beans.jar
This jar file is used by all applications. It contains all classes related to accessing the configuration file, creating and managing beans, and performing Inversion of Control/Dependency Injection (IoC/DI) operations. If the application only requires basic IoC/DI support, introduce the Spring-core.jar and Spring-beans. jar files.
3. Spring-aop.jar
This jar file contains the classes required to use Spring's AOP features in applications. Use Spring features based on AOP, such as Declarative Transaction Management, to include the jar package in the application.
4. Spring-context.jar
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, And the classes used to integrate the UI with the Templating engines such as Velocity, FreeMarker, and JasperReports, and Related Classes for Validation.
5. Spring-dao.jar
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.
6. Spring-hibernate.jar
This jar file contains all classes encapsulated by Spring for Hibernate 2 and Hibernate 3.
7. Spring-jdbc.jar
This jar file contains all classes that encapsulate Spring's JDBC data access.
Spring-orm.jar
This jar file contains Spring's extension of the DAO feature set to support iBATIS, JDO, OJB, and TopLink. Hibernate is already an independent package and is not included in this package. Most of the classes in this jar file depend on the classes in the Spring-dao.jar, You need to include the Spring-dao.jar package at the same time when using this package.
9. Spring-remoting.jar
This jar file contains classes supporting EJB, JMS, remote call Remoting (RMI, Hessian, Burlap, Http Invoker, JAX-RPC.
Spring-support.jar
This jar file contains classes that support Cache (ehcache), JCA, JMX, Mail service (Java Mail, COS Mail), and Task Plan Scheduling (Timer, Quartz.
11. Spring-web.jar
This jar file contains the core classes required to use the Spring framework for Web application development, includes automatic loading of WebApplicationContext, Struts and JSF integration, file upload support, Filter, and a large number of tool-assisted classes.
Spring-webmvc.jar
This jar file contains all classes related to the Spring MVC framework. Includes FreeMarker, JasperReports, Tiles, Velocity, and XSLT related classes for internationalization, tags, Theme, and view display. Of course, if your application uses an independent MVC framework, you do not need any classes in the JAR file.
13. Spring-mock.jar
This jar file contains a complete set of mock classes from 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.
The selection of these release packages is actually quite simple. If you are building a Web application and using Spring throughout the process, it is best to use a single whole Spring. jar file; if your application only uses a simple Inversion of Control/Dependency Injection (IoC/DI) container, you only need to Spring-core.jar and Spring-beans.jar; if you have high requirements on the release size, you have to select the jar file that contains the features you need. With an independent release package, you can avoid including all the classes that your application does not need. Of course, you can use other tools to make sure that the entire application package is smaller. The focus of space saving is to find out the Spring dependency classes you need accurately, then merge the required classes and packages. Eclispe has a plug-in named ClassPath Helper to help you find the dependent class.
Spring package dependency description:
1) Spring-core.jar needs commons-collections.jar, Spring-core.jar is the basic of the following other.
2) Spring-beans.jar for Spring-core.jar, cglib-nodep-2.1_3.jar
Spring-aop.jar, Spring-core.jar, Spring-beans.jar, aopalliance. jar
4) Spring-context.jar, Spring-core.jar, Spring-beans.jar, Spring-aop.jar, aopalliance. jar
5) Spring-dao.jar Spring-core.jar, Spring-beans.jar, Spring-aop.jar, Spring-context.jar
6) Spring-jdbc.jar Spring-core.jar, Spring-beans.jar, Spring-dao.jar
7) Spring-web.jar Spring-core.jar, Spring-beans.jar, Spring-context.jar
Spring-webmvc.jar/Spring-core.jar/Spring-beans.jar/Spring-context.jar
(9) Spring-hibernate. jar need Spring-core.jar, Spring-beans.jar, Spring-aop.jar, Spring-dao. jar, Spring-jdbc.jar, Spring-orm.jar, Spring-web.jar, Spring-webmvc.jar
Spring-orm.jar, Spring-core.jar, Spring-beans.jar, Spring-dao. jar, Spring-aop.jar, Spring-jdbc.jar, Spring-web.jar
11) Spring-remoting. jar need Spring-core.jar, Spring-beans.jar, Spring-aop.jar, Spring-dao. jar, Spring-context.jar, Spring-web.jar, Spring-webmvc.jar
Spring-support.jar, Spring-core.jar, Spring-beans.jar, Spring-aop.jar, Spring-dao.jar
13) Spring-mock.jar Spring-core.jar, Spring-beans.jar, Spring-dao.jar, Spring-context.jar
By LionCredo