1.搭建maven工程,具体参见我另一篇博客:http://www.cnblogs.com/kangyun/p/5455108.html
进行到配置web.xml之前那一步就可以了
2.maven导入依赖,我的pom.xml文件的依赖如下所示:
1 <dependencies> 2 <dependency> 3 <groupId>junit</groupId> 4 <artifactId>junit</artifactId> 5 <version>3.8.1</version> 6 <scope>test</scope> 7 </dependency> 8 <dependency> 9 <groupId>org.springframework</groupId> 10 <artifactId>spring-aop</artifactId> 11 <version>4.2.4.RELEASE</version> 12 </dependency> 13 <dependency> 14 <groupId>org.springframework</groupId> 15 <artifactId>spring-context-support</artifactId> 16 <version>4.2.4.RELEASE</version> 17 </dependency> 18 <dependency> 19 <groupId>org.springframework</groupId> 20 <artifactId>spring-core</artifactId> 21 <version>4.2.4.RELEASE</version> 22 </dependency> 23 <dependency> 24 <groupId>org.springframework</groupId> 25 <artifactId>spring-oxm</artifactId> 26 <version>3.0.4.RELEASE</version> 27 </dependency> 28 <dependency> 29 <groupId>org.springframework</groupId> 30 <artifactId>spring-jdbc</artifactId> 31 <version>4.2.4.RELEASE</version> 32 </dependency> 33 <dependency> 34 <groupId>org.springframework</groupId> 35 <artifactId>spring-test</artifactId> 36 <version>4.2.4.RELEASE</version> 37 </dependency> 38 <dependency> 39 <groupId>org.springframework</groupId> 40 <artifactId>spring-web</artifactId> 41 <version>4.2.4.RELEASE</version> 42 </dependency> 43 <dependency> 44 <groupId>org.springframework</groupId> 45 <artifactId>spring-webmvc</artifactId> 46 <version>4.2.4.RELEASE</version> 47 </dependency> 48 <dependency> 49 <groupId>org.springframework</groupId> 50 <artifactId>spring-tx</artifactId> 51 <version>4.2.4.RELEASE</version> 52 </dependency> 53 <dependency> 54 <groupId>org.mybatis</groupId> 55 <artifactId>mybatis</artifactId> 56 <version>3.3.0</version> 57 </dependency> 58 <dependency> 59 <groupId>org.mybatis</groupId> 60 <artifactId>mybatis-spring</artifactId> 61 <version>1.2.3</version> 62 </dependency> 63 <dependency> 64 <groupId>javax</groupId> 65 <artifactId>javaee-api</artifactId> 66 <version>7.0</version> 67 </dependency> 68 <dependency> 69 <groupId>mysql</groupId> 70 <artifactId>mysql-connector-java</artifactId> 71 <version>5.1.38</version> 72 </dependency> 73 <dependency> 74 <groupId>commons-dbcp</groupId> 75 <artifactId>commons-dbcp</artifactId> 76 <version>1.4</version> 77 </dependency> 78 <dependency> 79 <groupId>jstl</groupId> 80 <artifactId>jstl</artifactId> 81 <version>1.2</version> 82 </dependency> 83 <dependency> 84 <groupId>log4j</groupId> 85 <artifactId>log4j</artifactId> 86 <version>1.2.14</version> 87 </dependency> 88 <dependency> 89 <groupId>com.alibaba</groupId> 90 <artifactId>fastjson</artifactId> 91 <version>1.2.7</version> 92 </dependency> 93 <dependency> 94 <groupId>org.slf4j</groupId> 95 <artifactId>slf4j-api</artifactId> 96 <version>1.7.5</version> 97 </dependency> 98 <dependency> 99 <groupId>org.slf4j</groupId> 100 <artifactId>slf4j-log4j12</artifactId> 101 <version>1.7.5</version> 102 </dependency> 103 <dependency> 104 <groupId>org.codehaus.jackson</groupId> 105 <artifactId>jackson-mapper-asl</artifactId> 106 <version>1.9.13</version> 107 </dependency> 108 </dependencies>