创建MAVEN项目

在pom.xml文件中添加依赖:

      <dependency>  
            <groupId>javax</groupId>  
            <artifactId>javaee-api</artifactId>  
            <version>7.0</version>  
        </dependency>  



  1. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
  2.     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">  
  3.     <modelVersion>4.0.0</modelVersion>  
  4.     <groupId>com.millery</groupId>  
  5.     <artifactId>millery-ssm</artifactId>  
  6.     <version>0.0.1-SNAPSHOT</version>  
  7.     <packaging>war</packaging>  
  8.   
  9.     <dependencies>  
  10.         <!-- 单元测试 -->  
  11.         <dependency>  
  12.             <groupId>junit</groupId>  
  13.             <artifactId>junit</artifactId>  
  14.             <version>4.10</version>  
  15.             <scope>test</scope>  
  16.         </dependency>  
  17.   
  18.         <!-- Spring相关依赖 -->  
  19.         <dependency>  
  20.             <groupId>org.springframework</groupId>  
  21.             <artifactId>spring-context</artifactId>  
  22.             <version>4.1.3.RELEASE</version>  
  23.         </dependency>  
  24.         <dependency>  
  25.             <groupId>org.springframework</groupId>  
  26.             <artifactId>spring-beans</artifactId>  
  27.             <version>4.1.3.RELEASE</version>  
  28.         </dependency>  
  29.         <dependency>  
  30.             <groupId>org.springframework</groupId>  
  31.             <artifactId>spring-webmvc</artifactId>  
  32.             <version>4.1.3.RELEASE</version>  
  33.         </dependency>  
  34.         <dependency>  
  35.             <groupId>org.springframework</groupId>  
  36.             <artifactId>spring-jdbc</artifactId>  
  37.             <version>4.1.3.RELEASE</version>  
  38.         </dependency>  
  39.         <dependency>  
  40.             <groupId>org.springframework</groupId>  
  41.             <artifactId>spring-aspects</artifactId>  
  42.             <version>4.1.3.RELEASE</version>  
  43.         </dependency>  
  44.   
  45.         <!-- Mybatis依赖 -->  
  46.         <dependency>  
  47.             <groupId>org.mybatis</groupId>  
  48.             <artifactId>mybatis</artifactId>  
  49.             <version>3.2.8</version>  
  50.         </dependency>  
  51.   
  52.         <!-- mybatis整合Spring -->  
  53.         <dependency>  
  54.             <groupId>org.mybatis</groupId>  
  55.             <artifactId>mybatis-spring</artifactId>  
  56.             <version>1.2.2</version>  
  57.         </dependency>  
  58.   
  59.         <!-- MySql依赖 -->  
  60.         <dependency>  
  61.             <groupId>mysql</groupId>  
  62.             <artifactId>mysql-connector-java</artifactId>  
  63.             <version>5.1.32</version>  
  64.         </dependency>  
  65.   
  66.         <!-- slf4j日志依赖 -->  
  67.         <dependency>  
  68.             <groupId>org.slf4j</groupId>  
  69.             <artifactId>slf4j-log4j12</artifactId>  
  70.             <version>1.6.4</version>  
  71.         </dependency>  
  72.   
  73.         <!-- 连接池 -->  
  74.         <dependency>  
  75.             <groupId>com.jolbox</groupId>  
  76.             <artifactId>bonecp-spring</artifactId>  
  77.             <version>0.8.0.RELEASE</version>  
  78.         </dependency>  
  79.   
  80.         <!-- JSP相关 -->  
  81.         <dependency>  
  82.             <groupId>jstl</groupId>  
  83.             <artifactId>jstl</artifactId>  
  84.             <version>1.2</version>  
  85.         </dependency>  
  86.         <dependency>  
  87.             <groupId>javax.servlet</groupId>  
  88.             <artifactId>servlet-api</artifactId>  
  89.             <version>2.5</version>  
  90.             <scope>provided</scope>  
  91.         </dependency>  
  92.         <dependency>  
  93.             <groupId>javax.servlet</groupId>  
  94.             <artifactId>jsp-api</artifactId>  
  95.             <version>2.0</version>  
  96.             <scope>provided</scope>  
  97.         </dependency>  
  98.   
  99.     </dependencies>  
  100.   
  101.     <build>  
  102.         <plugins>  
  103.             <!-- 配置Tomcat插件 -->  
  104.             <plugin>  
  105.                 <groupId>org.apache.tomcat.maven</groupId>  
  106.                 <artifactId>tomcat7-maven-plugin</artifactId>  
  107.                 <configuration>  
  108.                     <port>8080</port>  
  109.                     <path>/</path>  
  110.                 </configuration>  
  111.             </plugin>  
  112.         </plugins>  
  113.     </build>  
  114. </project>  

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值