myeclipse 和maven下spring与hibernate配置

    <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.mzq</groupId>
     <artifactId>f</artifactId>
     <packaging>war</packaging>
     <version>0.0.1-SNAPSHOT</version>
     <name>f Maven Webapp</name>
     <url>http://maven.apache.org</url>
     <!-- 属性配置 -->
     <properties>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     <junit.version>4.10</junit.version>
     <logback.version>1.0.7</logback.version>
     <slf4j.version>1.7.2</slf4j.version>
     <servlet.version>3.1-b02</servlet.version>
     <spring.version>4.0.6.RELEASE</spring.version>
     <log4j.version>1.2.14</log4j.version>
     <cglib.version>2.1_3</cglib.version>
     <mysql.version>5.0.5</mysql.version>
     <hibernate.version>4.2.15.Final</hibernate.version>
     <dbcp.version>1.2.2</dbcp.version>
     <lang.version>3.3.2</lang.version>
     <validation.version>1.0.0.GA</validation.version>
     </properties>
     <dependencies>
     <!-- validation配置 -->
     <dependency>
     <groupId>javax.validation</groupId>
     <artifactId>validation-api</artifactId>
     <version>${validation.version}</version>
     </dependency>
     <!-- dbcp配置 -->
     <dependency>
     <groupId>commons-dbcp</groupId>
     <artifactId>commons-dbcp</artifactId>
     <version>${dbcp.version}</version>
     </dependency>
     <!-- lang配置 -->
     <dependency>
     <groupId>org.apache.commons</groupId>
     <artifactId>commons-lang3</artifactId>
     <version>${lang.version}</version>
     </dependency>
     <!-- hibernate配置 -->
     <dependency>
     <groupId>org.hibernate</groupId>
     <artifactId>hibernate-core</artifactId>
     <version>${hibernate.version}</version>
     </dependency>
     <!-- mysql配置 -->
     <dependency>
     <groupId>mysql</groupId>
     <artifactId>mysql-connector-java</artifactId>
     <version>${mysql.version}</version>
     </dependency>
     <!-- cglib配置 -->
     <dependency>
     <groupId>cglib</groupId>
     <artifactId>cglib-nodep</artifactId>
     <version>${cglib.version}</version>
     </dependency>
     <!-- JUnit配置 -->
     <dependency>
     <groupId>junit</groupId>
     <artifactId>junit</artifactId>
     <version>${junit.version}</version>
     <scope>test</scope>
     </dependency>
     <!-- SLF4J配置 -->
     <dependency>
     <groupId>org.slf4j</groupId>
     <artifactId>slf4j-api</artifactId>
     <version>${slf4j.version}</version>
     </dependency>
     <dependency>
     <groupId>org.slf4j</groupId>
     <artifactId>jcl-over-slf4j</artifactId>
     <version>${slf4j.version}</version>
     </dependency>
     <dependency>
     <groupId>org.slf4j</groupId>
     <artifactId>slf4j-log4j12</artifactId>
     <version>${slf4j.version}</version>
     <exclusions>
     <exclusion>
     <groupId>log4j</groupId>
     <artifactId>log4j</artifactId>
     </exclusion>
     </exclusions>
     </dependency>
     <!-- logback配置 -->
     <dependency>
     <groupId>ch.qos.logback</groupId>
     <artifactId>logback-core</artifactId>
     <version>${logback.version}</version>
     </dependency>
     <dependency>
     <groupId>ch.qos.logback</groupId>
     <artifactId>logback-classic</artifactId>
     <version>${logback.version}</version>
     </dependency>
     <!-- Servlet配置 -->
     <dependency>
     <groupId>javax.servlet</groupId>
     <artifactId>javax.servlet-api</artifactId>
     <version>${servlet.version}</version>
     <type>jar</type>
     <scope>provided</scope>
     </dependency>
     <!-- spring配置 -->
     <dependency>
     <groupId>org.springframework</groupId>
     <artifactId>spring-context</artifactId>
     <version>${spring.version}</version>
     </dependency>
     <dependency>
     <groupId>org.springframework</groupId>
     <artifactId>spring-tx</artifactId>
     <version>${spring.version}</version>
     </dependency>
     <dependency>
     <groupId>org.springframework</groupId>
     <artifactId>spring-web</artifactId>
     <version>${spring.version}</version>
     </dependency>
     <dependency>
     <groupId>org.springframework</groupId>
     <artifactId>spring-webmvc</artifactId>
     <version>${spring.version}</version>
     </dependency>
     <dependency>
     <groupId>org.springframework</groupId>
     <artifactId>spring-test</artifactId>
     <version>${spring.version}</version>
     </dependency>
     <dependency>
     <groupId>org.springframework</groupId>
     <artifactId>spring-jdbc</artifactId>
     <version>${spring.version}</version>
     </dependency>
     <dependency>
     <groupId>org.springframework</groupId>
     <artifactId>spring-aspects</artifactId>
     <version>${spring.version}</version>
     </dependency>
     <dependency>
     <groupId>org.springframework</groupId>
     <artifactId>spring-orm</artifactId>
     <version>${spring.version}</version>
     </dependency>
     <dependency>
     <groupId>org.springframework</groupId>
     <artifactId>spring-core</artifactId>
     <version>${spring.version}</version>
     <!-- 移除依赖包 -->
     <exclusions>
     <exclusion>
     <groupId>commons-logging</groupId>
     <artifactId>commons-logging</artifactId>
     </exclusion>
     </exclusions>
     </dependency>
     </dependencies>
     <build>
     <finalName>f</finalName>
     </build>
    </project>


参考这里http://my.oschina.net/moziqi/blog/295726

你可能感兴趣的:(myeclipse 和maven下spring与hibernate配置)