spring 4 jar 在 pom中的配置及jar作用的简要说明
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>Grain-SDHZ</groupId> <artifactId>Grain-SDHZ</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>war</packaging> <name>Grain-SDHZ</name> <description/> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <dependencies> <!-- 1111111111111111111111111111111111111111111111111 --> <!-- 1:这个jar文件包含在应用中使用Spring的AOP特性时所需的类。使用基于AOP的 Spring特性,如声明型事务管理(Declarative Transaction Management),也 要在应用里包含这个jar包。依赖opalliance-1.0.jar --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-aop</artifactId> <version>4.1.4.RELEASE</version> </dependency> <!-- 2:提供对AspectJ的支持,以便可以方便的将面向方面的功能集成进IDE中,比如 Eclipse AJDT。外部依赖。 --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-aspects</artifactId> <version>4.1.4.RELEASE</version> </dependency> <!-- 3:这个jar文件是所有应用都要用到的,它包含访问配置文件、创建和管理 bean以及进行Inversion of Control / Dependency Injection(IoC/DI)操 作相关的所有类。如果应用只需基本的IoC/DI支持,引入spring-core.jar及 spring-beans.jar文件就可以了。--> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-beans</artifactId> <version>4.1.4.RELEASE</version> </dependency> <!-- 4:这个jar文件为Spring核心提供了大量扩展。可以找到使用Spring ApplicationContext 特性时所需的全部类,JDNI所需的全部类,UI方面的用来与模板(Templating)引擎 如Velocity、FreeMarker、JasperReports集成的类,以及校验Validation方面的相关类。 spring-expression-4.1.4.RELEASE.jar --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version>4.1.4.RELEASE</version> </dependency> <!-- 5:spring-context 的扩展支持,包含支持缓存Cache(ehcache)、JCA、JMX、邮 件服务 (Java Mail、COS Mail)、任务计划Scheduling(Timer、Quartz)方面的类。 --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context-support</artifactId> <version>4.1.4.RELEASE</version> </dependency> <!-- 6:spring 核心包 依赖于commons-longging-1.2.jar 这个jar文件包含 Spring框架基本的核心工具类,Spring其它组件要都要使用到这个包里的类,是 其它组件的基本核心,当然你也可以在自己的应用系统中使用这些工具类。--> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-core</artifactId> <version>4.1.4.RELEASE</version> </dependency> <!-- 5:Spring Expression Language (SpEL) 表达式语言 contex xml需要这个东西 --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-expression</artifactId> <version>4.1.4.RELEASE</version> </dependency> <!-- 6:spring3.1 对服务器的代理接口--> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-instrument</artifactId> <version>4.1.4.RELEASE</version> </dependency> <!-- 7: spring3.1 对 Tomcat 的连接池的基成。--> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-instrument-tomcat</artifactId> <version>4.1.4.RELEASE</version> </dependency> <!-- 8:Spring 持久化技术 依赖于tx事物管理--> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-jdbc</artifactId> <version>4.1.4.RELEASE</version> </dependency> <!-- 9:Spring jms 依赖于messageing--> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-jms</artifactId> <version>4.1.4.RELEASE</version> </dependency> <!-- 10:Spring messaging--> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-messaging</artifactId> <version>4.1.4.RELEASE</version> </dependency> <!-- 11:Spring orm 提供了对hibernate jdo jpa的支持 hibernate4已经很好的 封装了持久化的操作,可选用--> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-orm</artifactId> <version>4.1.4.RELEASE</version> </dependency> <!-- 12:Spring oxm Spring 对Object/XMl的映射支持,可以让Java与XML之间来回切换--> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-oxm</artifactId> <version>4.1.4.RELEASE</version> </dependency> <!-- 13:Spring test Spring 测试类--> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> <version>4.1.4.RELEASE</version> </dependency> <!-- 14:Spring tx 为为JDBC、Hibernate、JDO、JPA等提供的一致的声明式和编程式事 务管理。--> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-tx</artifactId> <version>4.1.4.RELEASE</version> </dependency> <!-- 15:包含Web应用开发时,用到Spring框架时所需的核心类,包括自动载入WebApplic ationContext特性的类、Struts与JSF集成类、文件上传的支持类、Filter类和大量 工具辅助类。--> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-web</artifactId> <version>4.1.4.RELEASE</version> </dependency> <!-- 16:这个jar文件包含Spring MVC框架相关的所有类。包含国际化、标签、Theme、视 图展现的FreeMarker、JasperReports、Tiles、Velocity、 XSLT相关类。当然,如 果你的应用使用了独立的MVC框架,则无需这个JAR文件里的任何类。--> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> <version>4.1.4.RELEASE</version> </dependency> <!-- 17:spring-webmvc-portlet--> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc-portlet</artifactId> <version>4.1.4.RELEASE</version> </dependency> <!-- 18:spring-websocket--> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-websocket</artifactId> <version>4.1.4.RELEASE</version> </dependency> <!-- 1111111111111111111111111111111111111111111111111 --> <!-- spring aop 依赖 aop编程接口 --> <dependency> <groupId>org.aspectj</groupId> <artifactId>aspectjweaver</artifactId> <version>1.8.4</version> </dependency> <!-- aop 联盟 java aop接口 spring aop的依赖包--> <dependency> <groupId>aopalliance</groupId> <artifactId>aopalliance</artifactId> <version>1.0</version> </dependency> <!-- Commons-loggin的目的是为“所有的Java日志实现”提供一个统一的接口,它自身 的日志功能平常弱(只有一个简单的SimpleLog?),所以一般不会单独使用它。建议使用 log4.这里spring依赖要用到 --> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.2</version> </dependency> <dependency> <groupId>org.glassfish</groupId> <artifactId>javax.servlet</artifactId> <version>3.0.1</version> <scope>provided</scope> </dependency> <!-- <dependency> <groupId>org.glassfish</groupId> <artifactId>bean-validator</artifactId> <version>3.0-JBoss-4.0.2</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.glassfish</groupId> <artifactId>javax.enterprise.deploy</artifactId> <version>3.0.1</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.glassfish</groupId> <artifactId>javax.jms</artifactId> <version>3.0.1</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.glassfish</groupId> <artifactId>javax.management.j2ee</artifactId> <version>3.0.1</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.eclipse.persistence</groupId> <artifactId>javax.persistence</artifactId> <version>2.0.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.glassfish</groupId> <artifactId>javax.resource</artifactId> <version>3.0.1</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.glassfish</groupId> <artifactId>javax.security.auth.message</artifactId> <version>3.0.1</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.glassfish</groupId> <artifactId>javax.security.jacc</artifactId> <version>3.0.1</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.glassfish</groupId> <artifactId>javax.servlet</artifactId> <version>3.0.1</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.glassfish</groupId> <artifactId>javax.servlet.jsp</artifactId> <version>3.0.1</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.glassfish</groupId> <artifactId>javax.servlet.jsp.jstl</artifactId> <version>3.0.1</version> <scope>provided</scope> </dependency> <dependency> <groupId>javax.xml.bind</groupId> <artifactId>jaxb-api-osgi</artifactId> <version>2.2.1</version> <scope>provided</scope> </dependency> <dependency> <groupId>javax.ws.rs</groupId> <artifactId>jsr311-api</artifactId> <version>1.1.1</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.glassfish.web</groupId> <artifactId>jstl-impl</artifactId> <version>1.2</version> <scope>provided</scope> </dependency> <dependency> <groupId>javax.mail</groupId> <artifactId>mail</artifactId> <version>1.4.3</version> <scope>provided</scope> </dependency> <dependency> <groupId>javax.xml</groupId> <artifactId>webservices-api-osgi</artifactId> <version>2.0.1</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.jboss.weld</groupId> <artifactId>weld-osgi-bundle</artifactId> <version>1.0.1-SP3</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.glassfish.web</groupId> <artifactId>javax.servlet.jsp.jstl</artifactId> <version>1.2.1</version> </dependency> --> </dependencies> <build> <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.2</version> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> <plugin> <artifactId>maven-war-plugin</artifactId> <version>2.2</version> <configuration> <version>3.0</version> <failOnMissingWebXml>false</failOnMissingWebXml> </configuration> </plugin> </plugins> </build> </project>