修改pom.xml添加对应的包依赖

  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/maven-v4_0_0.xsd">  
  3.     <modelVersion>4.0.0</modelVersion>  
  4.     <groupId>org.andy.sm</groupId>  
  5.     <artifactId>springmvc_mybatis_demo</artifactId>  
  6.     <packaging>war</packaging>  
  7.     <version>0.0.1-SNAPSHOT</version>  
  8.   
  9.     <name>springmvc_mybatis_demo Maven Webapp</name>  
  10.     <url>http://maven.apache.org</url>  
  11.   
  12.     <properties>  
  13.         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>  
  14.         <spring.version>4.1.4.RELEASE</spring.version>  
  15.         <jackson.version>2.5.0</jackson.version>  
  16.     </properties>  
  17.   
  18.     <dependencies>  
  19.   
  20.         <dependency>  
  21.             <groupId>junit</groupId>  
  22.             <artifactId>junit</artifactId>  
  23.             <version>4.12</version>  
  24.             <scope>test</scope>  
  25.         </dependency>  
  26.   
  27.         <!-- spring -->  
  28.         <dependency>  
  29.             <groupId>org.springframework</groupId>  
  30.             <artifactId>spring-core</artifactId>  
  31.             <version>${spring.version}</version>  
  32.         </dependency>  
  33.   
  34.         <dependency>  
  35.             <groupId>org.springframework</groupId>  
  36.             <artifactId>spring-beans</artifactId>  
  37.             <version>${spring.version}</version>  
  38.         </dependency>  
  39.   
  40.         <dependency>  
  41.             <groupId>org.springframework</groupId>  
  42.             <artifactId>spring-context</artifactId>  
  43.             <version>${spring.version}</version>  
  44.         </dependency>  
  45.   
  46.         <dependency>  
  47.             <groupId>org.springframework</groupId>  
  48.             <artifactId>spring-tx</artifactId>  
  49.             <version>${spring.version}</version>  
  50.         </dependency>  
  51.   
  52.         <dependency>  
  53.             <groupId>org.springframework</groupId>  
  54.             <artifactId>spring-web</artifactId>  
  55.             <version>${spring.version}</version>  
  56.         </dependency>  
  57.   
  58.         <dependency>  
  59.             <groupId>org.springframework</groupId>  
  60.             <artifactId>spring-webmvc</artifactId>  
  61.             <version>${spring.version}</version>  
  62.         </dependency>  
  63.   
  64.         <dependency>  
  65.             <groupId>org.springframework</groupId>  
  66.             <artifactId>spring-jdbc</artifactId>  
  67.             <version>${spring.version}</version>  
  68.         </dependency>  
  69.   
  70.         <dependency>  
  71.             <groupId>org.springframework</groupId>  
  72.             <artifactId>spring-test</artifactId>  
  73.             <version>${spring.version}</version>  
  74.             <scope>test</scope>  
  75.         </dependency>  
  76.   
  77.         <!-- mybatis 包 -->  
  78.         <dependency>  
  79.             <groupId>org.mybatis</groupId>  
  80.             <artifactId>mybatis</artifactId>  
  81.             <version>3.2.8</version>  
  82.         </dependency>  
  83.   
  84.         <!--mybatis spring 插件 -->  
  85.         <dependency>  
  86.             <groupId>org.mybatis</groupId>  
  87.             <artifactId>mybatis-spring</artifactId>  
  88.             <version>1.2.2</version>  
  89.         </dependency>  
  90.   
  91.         <!-- mysql连接 -->  
  92.         <dependency>  
  93.             <groupId>mysql</groupId>  
  94.             <artifactId>mysql-connector-java</artifactId>  
  95.             <version>5.1.34</version>  
  96.         </dependency>  
  97.   
  98.         <!-- 数据源 -->  
  99.         <dependency>  
  100.             <groupId>com.alibaba</groupId>  
  101.             <artifactId>druid</artifactId>  
  102.             <version>1.0.12</version>  
  103.         </dependency>  
  104.   
  105.         <dependency>  
  106.             <groupId>org.aspectj</groupId>  
  107.             <artifactId>aspectjweaver</artifactId>  
  108.             <version>1.8.4</version>  
  109.         </dependency>  
  110.   
  111.         <!-- log4j -->  
  112.         <dependency>  
  113.             <groupId>log4j</groupId>  
  114.             <artifactId>log4j</artifactId>  
  115.             <version>1.2.17</version>  
  116.         </dependency>  
  117.   
  118.         <!-- servlet -->  
  119.         <dependency>  
  120.             <groupId>javax.servlet</groupId>  
  121.             <artifactId>servlet-api</artifactId>  
  122.             <version>3.0-alpha-1</version>  
  123.         </dependency>  
  124.   
  125.         <dependency>  
  126.             <groupId>javax.servlet</groupId>  
  127.             <artifactId>jstl</artifactId>  
  128.             <version>1.2</version>  
  129.         </dependency>  
  130.   
  131.         <!-- json -->  
  132.         <dependency>  
  133.             <groupId>org.codehaus.jackson</groupId>  
  134.             <artifactId>jackson-mapper-asl</artifactId>  
  135.             <version>1.9.13</version>  
  136.         </dependency>  
  137.   
  138.         <dependency>  
  139.             <groupId>com.alibaba</groupId>  
  140.             <artifactId>fastjson</artifactId>  
  141.             <version>1.2.3</version>  
  142.         </dependency>  
  143.   
  144.         <dependency>  
  145.             <groupId>com.fasterxml.jackson.core</groupId>  
  146.             <artifactId>jackson-annotations</artifactId>  
  147.             <version>${jackson.version}</version>  
  148.         </dependency>  
  149.   
  150.         <dependency>  
  151.             <groupId>com.fasterxml.jackson.core</groupId>  
  152.             <artifactId>jackson-core</artifactId>  
  153.             <version>${jackson.version}</version>  
  154.         </dependency>  
  155.   
  156.         <dependency>  
  157.             <groupId>com.fasterxml.jackson.core</groupId>  
  158.             <artifactId>jackson-databind</artifactId>  
  159.             <version>${jackson.version}</version>  
  160.         </dependency>  
  161.         <!-- 文件上传 -->  
  162.         <dependency>  
  163.             <groupId>commons-io</groupId>  
  164.             <artifactId>commons-io</artifactId>  
  165.             <version>2.4</version>  
  166.         </dependency>  
  167.   
  168.         <dependency>  
  169.             <groupId>commons-fileupload</groupId>  
  170.             <artifactId>commons-fileupload</artifactId>  
  171.             <version>1.2.2</version>  
  172.         </dependency>  
  173.   
  174.   
  175.     </dependencies>  
  176.   
  177.   
  178.     <build>  
  179.         <finalName>springmvc_mybatis_demo</finalName>  
  180.         <plugins>  
  181.             <!-- Run the JUnit unit tests in an isolated classloader -->  
  182.             <plugin>  
  183.                 <groupId>org.apache.maven.plugins</groupId>  
  184.                 <artifactId>maven-surefire-plugin</artifactId>  
  185.                 <version>2.4.2</version>  
  186.                 <configuration>  
  187.                     <skipTests>true</skipTests>  
  188.                 </configuration>  
  189.             </plugin>  
  190.   
  191.             <plugin>  
  192.                 <groupId>org.apache.maven.plugins</groupId>  
  193.                 <artifactId>maven-war-plugin</artifactId>  
  194.                 <version>2.3</version>  
  195.                 <configuration>  
  196.                     <webXml>src/main/webapp/WEB-INF/web.xml</webXml>  
  197.                 </configuration>  
  198.             </plugin>  
  199.   
  200.             <!-- generate java doc -->  
  201.             <plugin>  
  202.                 <groupId>org.apache.maven.plugins</groupId>  
  203.                 <artifactId>maven-javadoc-plugin</artifactId>  
  204.                 <version>2.9.1</version>  
  205.                 <configuration>  
  206.                     <javadocDirectory>target/javadoc</javadocDirectory>  
  207.                     <reportOutputDirectory>target/javadoc</reportOutputDirectory>  
  208.                     <charset>UTF-8</charset>  
  209.                     <encoding>UTF-8</encoding>  
  210.                     <docencoding>UTF-8</docencoding>  
  211.                     <show>private</show>  
  212.                 </configuration>  
  213.             </plugin>  
  214.   
  215.             <!-- 部署至本机 -->  
  216.             <plugin>  
  217.                 <groupId>org.codehaus.cargo</groupId>  
  218.                 <artifactId>cargo-maven2-plugin</artifactId>  
  219.                 <version>1.0</version>  
  220.                 <configuration>  
  221.                     <container>  
  222.                         <containerId>tomcat6x</containerId>  
  223.                         <home>D:\WebServer\apache-tomcat-6.0.39</home>  
  224.                     </container>  
  225.                     <configuration>  
  226.                         <type>existing</type>  
  227.                         <home>D:\WebServer\apache-tomcat-6.0.39</home>  
  228.                     </configuration>  
  229.                 </configuration>  
  230.             </plugin>  
  231.   
  232.         </plugins>  
  233.   
  234.     </build>  
  235. </project>  
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值