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 Spring framework core tool class, other components of spring to use the class in this package, is the basic core of other components, of course, you can also use these tool classes in your application system. Everyone (2) spring-beans.jar this jar file is used by all applications, it contains access to the configuration file, create and manage beans and conduct 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. (3) spring-aop.jar this jar package 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 lot 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 the classes spring Dao, Spring transaction for data access. To use declarative transaction support, you also need to include spring-aop.jar in your own applications. Debt Recovery (6) spring-hibernate.jar this jar file contains all the classes spring encapsulates on Hibernate 2 and hibernate 3. (7) spring-jdbc.jar this jar file contains all classes that encapsulate spring's JDBC data access. (8) spring-orm.jar JAR file contains spring to Dao feature set extended, so that it supports ibatis, JDO, OJB, toplink, because hibernate has been an independent package, it is not included in this package now. 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 that support EJB, JMS, remote call remoting (RMI, Hessian, burlap, HTTP invoker, JAX-RPC. (10) spring-support.jar this jar file contains support cache (ehcache), JCA, JMX, mail service (Java mail, cos mail), job Plan Scheduling (timer, quartz) class. (11) spring-web.jar this jar file contains the core class required for Web application development when Spring framework is used, includes automatic loading of webapplicationcontext, Struts and JSF integration, file upload support, filter, and a large number of tool-assisted classes. (12) 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 spring a set of mock classes 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 for release size, you have to carefully 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 spring-core.jar, cglib-nodep-2.1_3.jar 3)
Spring-aop.jar for spring-core.jar, spring-beans.jar, cglib-nodep-2.1_3.jar, aopalliance. Jar 4)
Spring-context.jar for spring-core.jar, spring-beans.jar, spring-aop.jar, commons-collections.jar, aopalliance. Jar 5)
Spring-dao.jar spring-core.jar, spring-beans.jar, spring-aop.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 8)
Spring-webmvc.jar spring-core.jar/spring-beans.jar/spring-context.jar/spring-web.jar 9)
Spring-hibernate.jar needs spring-core.jar, spring-beans. jar, spring-aop.jar, spring-dao.jar, spring-jdbc.jar, spring-Orm. jar, spring-web.jar, spring-webmvc.jar 10)
Spring-orm.jar spring-core.jar, spring-beans.jar, spring-aop.jar, spring-dao.jar, spring-jdbc.jar, spring-web.jar 11)
Spring-remoting.jar spring-core.jar, spring-beans.jar, spring-AOP. jar, spring-dao.jar, spring-context.jar, spring-webmvc. Jar 12)
Spring-support.jar spring-core.jar, spring-beans.jar, spring-aop.jar, spring-dao.jar, spring-context.jar 13)
Spring-mock.jar spring-core.jar, spring-beans.jar, spring-dao.jar, spring-context.jar
I. Only use the Spring framework
Dist \ spring. Jar
Lib \ Jakarta-commons \ commons-logging.jar
If you use aspect programming (AOP), you also need the following JAR files
Lib \ aspectj \ aspectjweaver. JSR and aspectjrt. Jar
Lib \ cglib \ cglib-nodep-2.1_3.jar
If the annotation in the JSR-250 is used, such as @ resource/@ postconstruct/@ predestroy
The following JAR files are also required
Lib \ J2EE \ common-annotations.jar
Ii. Only use the Spring framework.
Add some namespaces and enable the parser.
And @ resource needs to add Lib \ J2EE \ common-annotations.jar
<Context: annotation-config/> enable the processor
3. Automatic Scanning
You only need to enable the parser and some namespaces.
<Context: component-scan base-package = ""/>
Iv. AOP programming for the Spring framework
Some namespaces need to be imported
Xmlns: AOP .......
<AOP: aspectj-autoproxy/> enable the parser
If you use aspect programming (AOP), you also need the following JAR files
Lib \ aspectj \ aspectjweaver. JSR and aspectjrt. Jar
Lib \ cglib \ cglib-nodep-2.1_3.jar
V. Spring + JDBC Development
Required data source file Lib \ Jakarta-commons \ commons-pool.jar, Lib \ Jakarta-commons \ commons-dbcp.jar
1. Spring file:
Dist \ spring. jar,
Lib \ Jakarta-commons \ commons-logging.jar
2. JDBC driver file MySQL *** SQL ***:
Import the Tx namespace
<TX: annotation-driven transaction-Manager = ""/>
Parser for transaction Annotation
6. spring2.5 + hibernate3.3 + struts1.3
(1) hibernate core package
Hibernate3.jar
Lib \ required \ *. Jar
Lib \ optional \ ehcache-1.2.3.jar (second-level cache file)
Hibernate annotation package
Lib \ test \ slf4j-log4j12.jar
(2) Spring package
Dist \ spring. Jar
Lib \ Jakarta-commons \ commons-logging.jar and commons-pool.jar, commons-dbcp.jar (which is the data source file later)
Dist \ modules \ spring-webmvc-struts.jar (integration with struts1)
Lib \ aspectj \ aspectjweaver. JSR and aspectjrt. Jar (AOP file)
Lib \ cglib \ cglib-nodep-2.1_3.jar (AOP file)
Lib \ J2EE \ common-annotations.jar (annotation file)
Lib \ log4j \ log4j-1.2.15.jar
(3) sturs1.3.8
It is recommended that you replace the jstl-1.0.2.jar and standard-1.0.2.jar files with version 1.1 at this time the jstl File
There is also spring that already has a antlr-2.7.6.jar file, so remove the antlr-2.7.6.jar file in struts to avoid conflict
Database-driven
Change the MySQL *** SQL *** as needed
If the Web Container instance spring container
Add the file to Web. xml ......
If action enables container management, the path (struts configuration file) and name (Spring configuration file) must be consistent.
You must also add a controller to the struts configuration file.
Spring solves the garbled problem for struts1.3
Configure a filter in Web. xml
VII. spring2.5 + hibernate3.3 + struts2 Integrated Development Wind Situation Java-JavaScript mogujie.com women's clothing
Struts2 file LIB contains all jar files without the end of-plugin, but except the struts2-spring-plugin-2.0.11.1.jar