Spring和Hibernate使用maven整合时pom.xml的配置

来源:互联网 发布:哥萨克 知乎 编辑:程序博客网 时间:2024/06/06 21:41

今天整合了Spring和Hibernate,创建的是maven项目,所以将pom.xml内的配置内容记录一下,以免以后不时之需。

<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/maven-v4_0_0.xsd">    <modelVersion>4.0.0</modelVersion>    <groupId>com.cgy.test</groupId>    <artifactId>ssh</artifactId>    <packaging>war</packaging>    <version>0.0.1-SNAPSHOT</version>    <name>ssh Maven Webapp</name>    <url>http://maven.apache.org</url>    <dependencies>        <dependency>            <groupId>junit</groupId>            <artifactId>junit</artifactId>            <version>3.8.1</version>            <scope>test</scope>        </dependency>        <!-- hibernate依赖 -->        <dependency>            <groupId>org.hibernate</groupId>            <artifactId>hibernate-core</artifactId>            <version>4.3.5.Final</version>        </dependency>        <!-- spring依赖 -->        <dependency>            <groupId>org.springframework</groupId>            <artifactId>spring-core</artifactId>            <version>4.3.7.RELEASE</version>        </dependency>        <dependency>            <groupId>org.springframework</groupId>            <artifactId>spring-beans</artifactId>            <version>4.3.7.RELEASE</version>        </dependency>        <dependency>            <groupId>org.springframework</groupId>            <artifactId>spring-context</artifactId>            <version>4.3.7.RELEASE</version>        </dependency>        <dependency>            <groupId>org.springframework</groupId>            <artifactId>spring-expression</artifactId>            <version>4.3.7.RELEASE</version>        </dependency>        <dependency>            <groupId>org.springframework</groupId>            <artifactId>spring-jdbc</artifactId>            <version>4.3.7.RELEASE</version>        </dependency>        <dependency>            <groupId>org.springframework</groupId>            <artifactId>spring-orm</artifactId>            <version>4.3.7.RELEASE</version>        </dependency>        <dependency>            <groupId>org.springframework</groupId>            <artifactId>spring-tx</artifactId>            <version>4.3.7.RELEASE</version>        </dependency>        <!-- mysql依赖 -->        <dependency>            <groupId>mysql</groupId>            <artifactId>mysql-connector-java</artifactId>            <version>5.1.38</version>        </dependency>        <!-- aopalliance依赖 -->        <dependency>            <groupId>aopalliance</groupId>            <artifactId>aopalliance</artifactId>            <version>1.0</version>        </dependency>        <!-- common-pool2依赖 -->        <dependency>            <groupId>commons-pool</groupId>            <artifactId>commons-pool</artifactId>            <version>1.6</version>        </dependency>        <!-- common-dbcp依赖 -->        <dependency>            <groupId>commons-dbcp</groupId>            <artifactId>commons-dbcp</artifactId>            <version>1.4</version>        </dependency>        <!-- jboss-logging-annotations依赖 -->        <dependency>            <groupId>org.jboss.logging</groupId>            <artifactId>jboss-logging-annotations</artifactId>            <version>2.0.1.Final</version>        </dependency>    </dependencies>    <build>        <finalName>ssh</finalName>    </build></project>
阅读全文
0 0