4、spring+springMVC+mybaits+idea+maven
1、构建项目结构如下
2、构建项目中的pom.xml文件中的依赖资源,里面包含ajax和分页插件的依赖哦
1 <?xml version="1.0" encoding="UTF-8"?> 2 3 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 4 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 5 <modelVersion>4.0.0</modelVersion> 6 7 <groupId>com</groupId> 8 <artifactId>ssm_day45_01</artifactId> 9 <version>1.0-SNAPSHOT</version> 10 <packaging>war</packaging> 11 12 <name>ssm_day45_01 Maven Webapp</name> 13 <!-- FIXME change it to the project"s website --> 14 <url>http://www.example.com</url> 15 16 <properties> 17 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 18 <maven.compiler.source>1.7</maven.compiler.source> 19 <maven.compiler.target>1.7</maven.compiler.target> 20 </properties> 21 22 <dependencies> 23 <dependency> 24 <groupId>junit</groupId> 25 <artifactId>junit</artifactId> 26 <version>4.11</version> 27 </dependency> 28 29 30 <!--1 https://mvnrepository.com/artifact/org.springframework/spring-beans --> 31 <dependency> 32 <groupId>org.springframework</groupId> 33 <artifactId>spring-beans</artifactId> 34 <version>4.3.6.RELEASE</version> 35 </dependency> 36 37 38 <!--2 https://mvnrepository.com/artifact/org.springframework/spring-context --> 39 <dependency> 40 <groupId>org.springframework</groupId> 41 <artifactId>spring-context</artifactId> 42 <version>4.3.6.RELEASE</version> 43 </dependency> 44 45 46 <!-- 3https://mvnrepository.com/artifact/org.springframework/spring-core --> 47 <dependency> 48 <groupId>org.springframework</groupId> 49 <artifactId>spring-core</artifactId> 50 <version>4.3.6.RELEASE</version> 51 </dependency> 52 53 54 <!--4 https://mvnrepository.com/artifact/org.springframework/spring-expression --> 55 <dependency> 56 <groupId>org.springframework</groupId> 57 <artifactId>spring-expression</artifactId> 58 <version>4.3.6.RELEASE</version> 59 </dependency> 60 61 62 <!--5 https://mvnrepository.com/artifact/org.springframework/spring-aop --> 63 <dependency> 64 <groupId>org.springframework</groupId> 65 <artifactId>spring-aop</artifactId> 66 <version>4.3.6.RELEASE</version> 67 </dependency> 68 69 70 <!--6 https://mvnrepository.com/artifact/aopalliance/aopalliance --> 71 <dependency> 72 <groupId>aopalliance</groupId> 73 <artifactId>aopalliance</artifactId> 74 <version>1.0</version> 75 </dependency> 76 77 78 <!--7 https://mvnrepository.com/artifact/org.aspectj/aspectjweaver --> 79 <dependency> 80 <groupId>org.aspectj</groupId> 81 <artifactId>aspectjweaver</artifactId> 82 <version>1.8.10</version> 83 </dependency> 84 85 86 <!--8 https://mvnrepository.com/artifact/log4j/log4j --> 87 <dependency> 88 <groupId>log4j</groupId> 89 <artifactId>log4j</artifactId> 90 <version>1.2.17</version> 91 </dependency> 92 93 94 <!--9 https://mvnrepository.com/artifact/commons-logging/commons-logging --> 95 <dependency> 96 <groupId>commons-logging</groupId> 97 <artifactId>commons-logging</artifactId> 98 <version>1.2</version> 99 </dependency> 100 101 102 <!--10 https://mvnrepository.com/artifact/org.springframework/spring-jdbc --> 103 <dependency> 104 <groupId>org.springframework</groupId> 105 <artifactId>spring-jdbc</artifactId> 106 <version>4.3.6.RELEASE</version> 107 </dependency> 108 109 110 <!--11 https://mvnrepository.com/artifact/org.springframework/spring-orm --> 111 <dependency> 112 <groupId>org.springframework</groupId> 113 <artifactId>spring-orm</artifactId> 114 <version>4.3.6.RELEASE</version> 115 </dependency> 116 117 118 <!--12 https://mvnrepository.com/artifact/org.springframework/spring-tx --> 119 <dependency> 120 <groupId>org.springframework</groupId> 121 <artifactId>spring-tx</artifactId> 122 <version>4.3.6.RELEASE</version> 123 </dependency> 124 125 126 <!--13 https://mvnrepository.com/artifact/org.springframework/spring-web --> 127 <dependency> 128 <groupId>org.springframework</groupId> 129 <artifactId>spring-web</artifactId> 130 <version>4.3.6.RELEASE</version> 131 </dependency> 132 133 134 <!--14 https://mvnrepository.com/artifact/org.springframework/spring-webmvc --> 135 <dependency> 136 <groupId>org.springframework</groupId> 137 <artifactId>spring-webmvc</artifactId> 138 <version>4.3.6.RELEASE</version> 139 </dependency> 140 141 142 <!--15 https://mvnrepository.com/artifact/org.mybatis/mybatis --> 143 <dependency> 144 <groupId>org.mybatis</groupId> 145 <artifactId>mybatis</artifactId> 146 <version>3.4.6</version> 147 </dependency> 148 149 150 <!--16 https://mvnrepository.com/artifact/mysql/mysql-connector-java --> 151 <dependency> 152 <groupId>mysql</groupId> 153 <artifactId>mysql-connector-java</artifactId> 154 <version>5.1.38</version> 155 </dependency> 156 157 158 <!--17 https://mvnrepository.com/artifact/org.mybatis/mybatis-spring --> 159 <dependency> 160 <groupId>org.mybatis</groupId> 161 <artifactId>mybatis-spring</artifactId> 162 <version>1.3.2</version> 163 </dependency> 164 165 <!--18 https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api --> 166 <dependency> 167 <groupId>javax.servlet</groupId> 168 <artifactId>javax.servlet-api</artifactId> 169 <version>3.1.0</version> 170 </dependency> 171 172 <!--19 https://mvnrepository.com/artifact/javax.servlet/jstl --> 173 <dependency> 174 <groupId>javax.servlet</groupId> 175 <artifactId>jstl</artifactId> 176 <version>1.2</version> 177 </dependency> 178 179 180 <!--20 https://mvnrepository.com/artifact/taglibs/standard --> 181 <dependency> 182 <groupId>taglibs</groupId> 183 <artifactId>standard</artifactId> 184 <version>1.1.2</version> 185 </dependency> 186 187 <!--文件上传使用的jar--> 188 <!--21 https://mvnrepository.com/artifact/commons-io/commons-io --> 189 <dependency> 190 <groupId>commons-io</groupId> 191 <artifactId>commons-io</artifactId> 192 <version>2.4</version> 193 </dependency> 194 <!--22--> 195 <dependency> 196 <groupId>commons-fileupload</groupId> 197 <artifactId>commons-fileupload</artifactId> 198 <version>1.3.3</version> 199 </dependency> 200 201 <!--23 下载ajax封装数据json格式交互的jar--> 202 <dependency> 203 <groupId>com.fasterxml.jackson.core</groupId> 204 <artifactId>jackson-databind</artifactId> 205 <version>2.9.6</version> 206 </dependency> 207 208 <dependency> 209 <groupId>com.fasterxml.jackson.core</groupId> 210 <artifactId>jackson-core</artifactId> 211 <version>2.9.6</version> 212 </dependency> 213 214 <dependency> 215 <groupId>com.fasterxml.jackson.core</groupId> 216 <artifactId>jackson-annotations</artifactId> 217 <version>2.9.6</version> 218 </dependency> 219 220 <!--使用4的版本否则springmvc的xml--> 221 <dependency> 222 <groupId>com.github.pagehelper</groupId> 223 <artifactId>pagehelper</artifactId> 224 <version>4.1.6</version> 225 </dependency> 226 </dependencies> 227 228 </project>