1. 程式人生 > >RESTful風格的SSM框架搭建

RESTful風格的SSM框架搭建

  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>com.huitong</groupId>
  5   <artifactId>friend</artifactId>
  6
<packaging>war</packaging> 7 <version>1.0-SNAPSHOT</version> 8 <name>friend Maven Webapp</name> 9 <url>http://maven.apache.org</url> 10 11 12 <properties> 13 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 14
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> 15 <!-- spring版本號 --> 16 <spring.version>4.3.0.RELEASE</spring.version> 17 18 <!-- mybatis版本號 --> 19 <mybatis.version>3.4.4</mybatis.version> 20 21 <!-- mysql驅動版本號 --> 22
<mysql-driver.version>5.1.40</mysql-driver.version> 23 24 <!-- log4j日誌包版本號 --> 25 <log4j.version>2.7</log4j.version> 26 <commons-logging.version>1.2</commons-logging.version> 27 28 <!-- 物件轉 jackson 版本號 --> 29 <jackson.version>2.8.5</jackson.version> 30 31 <!--spring security version--> 32 <spring.security.version>4.2.3.RELEASE</spring.security.version> 33 34 <mysql.user>root</mysql.user> 35 <mysql.password>123456</mysql.password> 36 37 38 </properties> 39 <dependencies> 40 <dependency> 41 <groupId>junit</groupId> 42 <artifactId>junit</artifactId> 43 <version>4.11</version> 44 <scope>test</scope> 45 </dependency> 46 47 48 <!-- 新增jstl依賴 --> 49 <dependency> 50 <groupId>jstl</groupId> 51 <artifactId>jstl</artifactId> 52 <version>1.2</version> 53 </dependency> 54 55 <!-- javaee 7.0 --> 56 <!-- https://mvnrepository.com/artifact/javax/javaee-api --> 57 <dependency> 58 <groupId>javax</groupId> 59 <artifactId>javaee-api</artifactId> 60 <version>7.0</version> 61 </dependency> 62 63 64 <!-- ######## spring mvc 依賴包 start ################################--> 65 <!-- https://mvnrepository.com/artifact/org.springframework/spring-web --> 66 <dependency> 67 <groupId>org.springframework</groupId> 68 <artifactId>spring-web</artifactId> 69 <version>${spring.version}</version> 70 </dependency> 71 72 <!-- https://mvnrepository.com/artifact/org.springframework/spring-webmvc --> 73 <dependency> 74 <groupId>org.springframework</groupId> 75 <artifactId>spring-webmvc</artifactId> 76 <version>${spring.version}</version> 77 </dependency> 78 <!-- ######## spring mvc 依賴包 end ################################--> 79 80 <!-- ######## spring core 依賴包 start ################################--> 81 <!-- https://mvnrepository.com/artifact/org.springframework/spring-beans --> 82 <dependency> 83 <groupId>org.springframework</groupId> 84 <artifactId>spring-beans</artifactId> 85 <version>${spring.version}</version> 86 </dependency> 87 88 <!-- https://mvnrepository.com/artifact/org.springframework/spring-context --> 89 <dependency> 90 <groupId>org.springframework</groupId> 91 <artifactId>spring-context</artifactId> 92 <version>${spring.version}</version> 93 </dependency> 94 95 <!-- https://mvnrepository.com/artifact/org.springframework/spring-core --> 96 <dependency> 97 <groupId>org.springframework</groupId> 98 <artifactId>spring-core</artifactId> 99 <version>${spring.version}</version> 100 </dependency> 101 <!-- ######## spring core 依賴包 end ################################--> 102 103 <!-- ######## mybatis core 依賴包 start ################################--> 104 <!-- https://mvnrepository.com/artifact/org.ow2.asm/asm --> 105 <dependency> 106 <groupId>org.ow2.asm</groupId> 107 <artifactId>asm</artifactId> 108 <version>5.2</version> 109 </dependency> 110 111 <!-- https://mvnrepository.com/artifact/cglib/cglib --> 112 <dependency> 113 <groupId>cglib</groupId> 114 <artifactId>cglib</artifactId> 115 <version>3.2.5</version> 116 </dependency> 117 118 <!-- https://mvnrepository.com/artifact/org.mybatis/mybatis --> 119 <dependency> 120 <groupId>org.mybatis</groupId> 121 <artifactId>mybatis</artifactId> 122 <version>${mybatis.version}</version> 123 </dependency> 124 <!-- ######## mybatis core 依賴包 end ################################--> 125 126 <!-- ######## mybatis spring 依賴包 start ################################--> 127 <!-- https://mvnrepository.com/artifact/org.mybatis/mybatis-spring --> 128 <dependency> 129 <groupId>org.mybatis</groupId> 130 <artifactId>mybatis-spring</artifactId> 131 <version>1.3.1</version> 132 </dependency> 133 <!-- ######## mybatis spring 依賴包 end ################################--> 134 135 136 <!-- ######## DBconnector 依賴包 start ################################--> 137 <!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java --> 138 <dependency> 139 <groupId>mysql</groupId> 140 <artifactId>mysql-connector-java</artifactId> 141 <version>${mysql-driver.version}</version> 142 </dependency> 143 144 <!-- https://mvnrepository.com/artifact/com.mchange/c3p0 --> 145 <dependency> 146 <groupId>com.mchange</groupId> 147 <artifactId>c3p0</artifactId> 148 <version>0.9.5.2</version> 149 </dependency> 150 <!-- ######## DBconnector 依賴包 end ################################--> 151 152 <!-- ######## translation 依賴包 start ################################--> 153 <!-- https://mvnrepository.com/artifact/org.springframework/spring-jdbc --> 154 <dependency> 155 <groupId>org.springframework</groupId> 156 <artifactId>spring-jdbc</artifactId> 157 <version>${spring.version}</version> 158 </dependency> 159 160 <!-- https://mvnrepository.com/artifact/org.springframework/spring-tx --> 161 <dependency> 162 <groupId>org.springframework</groupId> 163 <artifactId>spring-tx</artifactId> 164 <version>${spring.version}</version> 165 </dependency> 166 <!-- ######## translation 依賴包 end ################################--> 167 168 <!-- ######## AOP 依賴包 start ################################--> 169 <!-- https://mvnrepository.com/artifact/aopalliance/aopalliance --> 170 <dependency> 171 <groupId>aopalliance</groupId> 172 <artifactId>aopalliance</artifactId> 173 <version>1.0</version> 174 </dependency> 175 176 <!-- https://mvnrepository.com/artifact/org.aspectj/aspectjrt --> 177 <dependency> 178 <groupId>org.aspectj</groupId> 179 <artifactId>aspectjrt</artifactId> 180 <version>1.8.10</version> 181 </dependency> 182 183 <!-- https://mvnrepository.com/artifact/org.aspectj/aspectjweaver --> 184 <dependency> 185 <groupId>org.aspectj</groupId> 186 <artifactId>aspectjweaver</artifactId> 187 <version>1.8.10</version> 188 </dependency> 189 190 <!-- https://mvnrepository.com/artifact/org.springframework/spring-aop --> 191 <dependency> 192 <groupId>org.springframework</groupId> 193 <artifactId>spring-aop</artifactId> 194 <version>${spring.version}</version> 195 </dependency> 196 <!-- ######## AOP 依賴包 end ################################--> 197 198 199 <!-- ######## json 依賴包 start ################################--> 200 <dependency> 201 <groupId>com.fasterxml.jackson.core</groupId> 202 <artifactId>jackson-core</artifactId> 203 <version>${jackson.version}</version> 204 </dependency> 205 <dependency> 206 <groupId>com.fasterxml.jackson.core</groupId> 207 <artifactId>jackson-databind</artifactId> 208 <version>${jackson.version}</version> 209 </dependency> 210 <dependency> 211 <groupId>com.fasterxml.jackson.core</groupId> 212 <artifactId>jackson-annotations</artifactId> 213 <version>${jackson.version}</version> 214 </dependency> 215 <!-- ######## json 依賴包 end ################################--> 216 217 218 <dependency> 219 <groupId>commons-fileupload</groupId> 220 <artifactId>commons-fileupload</artifactId> 221 <version>1.3.3</version> 222 </dependency> 223 224 225 <!-- https://mvnrepository.com/artifact/commons-logging/commons-logging --> 226 <dependency> 227 <groupId>commons-logging</groupId> 228 <artifactId>commons-logging</artifactId> 229 <version>${commons-logging.version}</version> 230 </dependency> 231 232 <!-- https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-core --> 233 <dependency> 234 <groupId>org.apache.logging.log4j</groupId> 235 <artifactId>log4j-core</artifactId> 236 <version>${log4j.version}</version> 237 </dependency> 238 239 <dependency> 240 <groupId>org.springframework.security</groupId> 241 <artifactId>spring-security-web</artifactId> 242 <version>4.2.3.RELEASE</version> 243 </dependency> 244 245 </dependencies> 246 247 248 <build> 249 <finalName>friend</finalName> 250 <resources> 251 <resource> 252 <directory>src/main/resources</directory> 253 <filtering>true</filtering> 254 <includes> 255 <include>**/*.xml</include> 256 </includes> 257 </resource> 258 259 <resource> 260 <directory>src/main/resources</directory> 261 <filtering>true</filtering> 262 <includes> 263 <include>**/*.properties</include> 264 </includes> 265 </resource> 266 267 <resource> 268 <directory>src/main/resources</directory> 269 <excludes> 270 <exclude>**/*.properties</exclude> 271 </excludes> 272 </resource> 273 274 <resource> 275 <directory>src/main/java</directory> 276 <excludes> 277 <exclude>**/*.java</exclude> 278 </excludes> 279 </resource> 280 281 282 </resources> 283 </build> 284 </project>