1. 程式人生 > >Maven多模組,Dubbo分散式服務框架,SpringMVC,前後端分離專案,基礎搭建,搭建過程出現的問題

Maven多模組,Dubbo分散式服務框架,SpringMVC,前後端分離專案,基礎搭建,搭建過程出現的問題

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 5 <groupId>com.student.demo</groupId
> 6 <artifactId>student-demo</artifactId> 7 <version>1.0.0-SNAPSHOT</version> 8 <packaging>pom</packaging> 9 10 <properties> 11 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 12 <dep.ver.lombok>1.16.10</
dep.ver.lombok> 13 <dep.ver.druid>1.0.1</dep.ver.druid> 14 <dep.ver.mysql>5.1.21</dep.ver.mysql> 15 <dep.ver.springframework>4.2.5.RELEASE</dep.ver.springframework> 16 <dep.ver.mybatis>3.3.0</dep.ver.mybatis> 17 <
dep.ver.mybatis-spring>1.3.0</dep.ver.mybatis-spring> 18 <dep.ver.pagehelper>4.1.6</dep.ver.pagehelper> 19 <dep.ver.aspectjrt>1.5.4</dep.ver.aspectjrt> 20 <dep.ver.aspectjweaver>1.8.0</dep.ver.aspectjweaver> 21 <dep.ver.servlet>3.1.0</dep.ver.servlet> 22 <dep.ver.orika-core>1.4.6</dep.ver.orika-core> 23 <dep.ver.javassist>3.20.0-GA</dep.ver.javassist> 24 <dep.ver.paranamer>2.7</dep.ver.paranamer> 25 <dep.ver.concurrentlinkedhashmap-lru>1.4.2</dep.ver.concurrentlinkedhashmap-lru> 26 <dep.ver.gson>2.2.4</dep.ver.gson> 27 <dep.ver.guava>15.0</dep.ver.guava> 28 <dep.ver.slf4j>1.7.21</dep.ver.slf4j> 29 <dep.ver.logback>1.1.7</dep.ver.logback> 30 <dep.ver.log4j>1.2.12</dep.ver.log4j> 31 <dep.ver.slf4j-log4j12>1.7.5</dep.ver.slf4j-log4j12> 32 <dep.ver.logback-ext-spring>0.1.2</dep.ver.logback-ext-spring> 33 <dep.ver.dubbo>2.5.3</dep.ver.dubbo> 34 <dep.ver.zookeeper>3.4.8</dep.ver.zookeeper> 35 <dep.ver.zkclient>0.8</dep.ver.zkclient> 36 <dep.ver.commons-lang3>3.1</dep.ver.commons-lang3> 37 <dep.ver.jackson>1.9.12</dep.ver.jackson> 38 <dep.ver.shiro>1.2.3</dep.ver.shiro> 39 <dep.ver.freemarker>2.3.22</dep.ver.freemarker> 40 <dep.ver.commons-beanutils>1.9.2</dep.ver.commons-beanutils> 41 <dep.ver.junit>4.11</dep.ver.junit> 42 <dep.ver.mockito>1.10.19</dep.ver.mockito> 43 <dep.ver.joda-time>2.9.3</dep.ver.joda-time> 44 <dep.ver.commons-collections4>4.1</dep.ver.commons-collections4> 45 <dep.ver.httpclient>4.5.2</dep.ver.httpclient> 46 47 <dep.ver.fastjson>1.2.11</dep.ver.fastjson> 48 49 <plg.ver.maven-resources-plugin>2.7</plg.ver.maven-resources-plugin> 50 <plg.ver.maven-compiler-plugin>2.5.1</plg.ver.maven-compiler-plugin> 51 <plg.ver.maven-source-plugin>3.0.0</plg.ver.maven-source-plugin> 52 <plg.ver.lombok-maven-plugin>1.14.8.0</plg.ver.lombok-maven-plugin> 53 54 <jdk.ver>1.8</jdk.ver> 55 <encoding>UTF-8</encoding> 56 <center.project.name>${project.artifactId}</center.project.name> 57 <profiles.dir>src/profiles</profiles.dir> 58 <jackson.version>2.6.0</jackson.version> 59 </properties> 60 <modules> 61 <module>student-service</module> 62 <module>student-api</module> 63 <module>student-web</module> 64 </modules> 65 66 <dependencies> 67 <dependency> 68 <groupId>org.hibernate</groupId> 69 <artifactId>hibernate-validator</artifactId> 70 <version>5.2.4.Final</version> 71 </dependency> 72 </dependencies> 73 74 <dependencyManagement> 75 <dependencies> 76 <!-- spring --> 77 <dependency> 78 <groupId>org.springframework</groupId> 79 <artifactId>spring-core</artifactId> 80 <version>${dep.ver.springframework}</version> 81 <exclusions> 82 <exclusion> 83 <groupId>commons-logging</groupId> 84 <artifactId>commons-logging</artifactId> 85 </exclusion> 86 </exclusions> 87 </dependency> 88 <dependency> 89 <groupId>org.springframework</groupId> 90 <artifactId>spring-context</artifactId> 91 <version>${dep.ver.springframework}</version> 92 </dependency> 93 <dependency> 94 <groupId>org.springframework</groupId> 95 <artifactId>spring-context-support</artifactId> 96 <version>${dep.ver.springframework}</version> 97 </dependency> 98 <dependency> 99 <groupId>org.springframework</groupId> 100 <artifactId>spring-web</artifactId> 101 <version>${dep.ver.springframework}</version> 102 </dependency> 103 <dependency> 104 <groupId>org.springframework</groupId> 105 <artifactId>spring-webmvc</artifactId> 106 <version>${dep.ver.springframework}</version> 107 </dependency> 108 <dependency> 109 <groupId>org.springframework</groupId> 110 <artifactId>spring-jdbc</artifactId> 111 <version>${dep.ver.springframework}</version> 112 </dependency> 113 <dependency> 114 <groupId>org.springframework</groupId> 115 <artifactId>spring-tx</artifactId> 116 <version>${dep.ver.springframework}</version> 117 </dependency> 118 <dependency> 119 <groupId>org.springframework</groupId> 120 <artifactId>spring-aspects</artifactId> 121 <version>${dep.ver.springframework}</version> 122 </dependency> 123 <!-- spring --> 124 <!-- db --> 125 <dependency> 126 <groupId>com.alibaba</groupId> 127 <artifactId>druid</artifactId> 128 <version>${dep.ver.druid}</version> 129 </dependency> 130 <dependency> 131 <groupId>mysql</groupId> 132 <artifactId>mysql-connector-java</artifactId> 133 <version>${dep.ver.mysql}</version> 134 </dependency> 135 <!-- db --> 136 <!-- mybatis --> 137 <dependency> 138 <groupId>org.mybatis</groupId> 139 <artifactId>mybatis</artifactId> 140 <version>${dep.ver.mybatis}</version> 141 </dependency> 142 <dependency> 143 <groupId>org.mybatis</groupId> 144 <artifactId>mybatis-spring</artifactId> 145 <version>${dep.ver.mybatis-spring}</version> 146 </dependency> 147 <dependency> 148 <groupId>com.github.pagehelper</groupId> 149 <artifactId>pagehelper</artifactId> 150 <version>${dep.ver.pagehelper}</version> 151 </dependency> 152 <!-- mybatis --> 153 <!-- apache --> 154 <dependency> 155 <groupId>org.apache.commons</groupId> 156 <artifactId>commons-lang3</artifactId> 157 <version>${dep.ver.commons-lang3}</version> 158 </dependency> 159 <!-- apache --> 160 <!-- commons-beanutils --> 161 <dependency> 162 <groupId>commons-beanutils</groupId> 163 <artifactId>commons-beanutils</artifactId> 164 <version>${dep.ver.commons-beanutils}</version> 165 <exclusions> 166 <exclusion> 167 <groupId>commons-logging</groupId> 168 <artifactId>commons-logging</artifactId> 169 </exclusion> 170 </exclusions> 171 </dependency> 172 <!-- commons-beanutils --> 173 <!-- log --> 174 <dependency> 175 <groupId>org.slf4j</groupId> 176 <artifactId>slf4j-api</artifactId> 177 <version>${dep.ver.slf4j}</version> 178 </dependency> 179 <dependency> 180 <groupId>org.slf4j</groupId> 181 <artifactId>log4j-over-slf4j</artifactId> 182 <version>${dep.ver.slf4j}</version> 183 </dependency> 184 <dependency> 185 <groupId>org.slf4j</groupId> 186 <artifactId>jcl-over-slf4j</artifactId> 187 <version>${dep.ver.slf4j}</version> 188 </dependency> 189 <dependency> 190 <groupId>ch.qos.logback</groupId> 191 <artifactId>logback-classic</artifactId> 192 <version>${dep.ver.logback}</version> 193 </dependency> 194 <!-- log --> 195 <!-- dubbo --> 196 <dependency> 197 <groupId>com.alibaba</groupId> 198 <artifactId>dubbo</artifactId> 199 <version>${dep.ver.dubbo}</version> 200 <exclusions> 201 <exclusion> 202 <artifactId>spring</artifactId> 203 <groupId>org.springframework</groupId> 204 </exclusion> 205 <exclusion> 206 <artifactId>netty</artifactId> 207 <groupId>org.jboss.netty</groupId> 208 </exclusion> 209 </exclusions> 210 </dependency> 211 <!-- dubbo --> 212 <!-- zookeeper --> 213 <dependency> 214 <groupId>org.apache.zookeeper</groupId> 215 <artifactId>zookeeper</artifactId> 216 <version>${dep.ver.zookeeper}</version> 217 <exclusions> 218 <exclusion> 219 <groupId>log4j</groupId> 220 <artifactId>log4j</artifactId> 221 </exclusion> 222 </exclusions> 223 </dependency> 224 <dependency> 225 <groupId>com.101tec</groupId> 226 <artifactId>zkclient</artifactId> 227 <version>${dep.ver.zkclient}</version> 228 <exclusions> 229 <exclusion> 230 <groupId>log4j</groupId> 231 <artifactId>log4j</artifactId> 232 </exclusion> 233 </exclusions> 234 </dependency> 235 <!-- zookeeper --> 236 <!-- jackson --> 237 <dependency> 238 <groupId>org.codehaus.jackson</groupId> 239 <artifactId>jackson-core-asl</artifactId> 240 <version>${dep.ver.jackson}</version> 241 </dependency> 242 <dependency> 243 <groupId>org.codehaus.jackson</groupId> 244 <artifactId>jackson-mapper-asl</artifactId> 245 <version>${dep.ver.jackson}</version> 246 </dependency> 247 <!-- jackson --> 248 <!-- aspectj --> 249 <dependency> 250 <groupId>aspectj</groupId> 251 <artifactId>aspectjrt</artifactId> 252 <version>${dep.ver.aspectjrt}</version> 253 </dependency> 254 <dependency> 255 <