1.taotao商场简介:
淘淘网上商城是一个综合性的B2C平台,类似京东商城、天猫商城。会员可以在商城浏览商品、下订单,以及参加各种活动。管理员、运营可以在平台后台管理系统中管理商品、订单、会员等。客服可以在后台管理系统中处理用户的询问以及投诉。
这是一个分布式架构工程,很适合初学者学习练手,可以学习多模块工程的创建、学习dubbo、zookeeper、Redis、Solr等技术,熟悉spring、springMVC、myBatis框架的整合,当然博主自己也是菜鸟一枚,所以如果有写得不对的地方请见谅。
2.工程之间的依赖关系
3.创建工程
3.1先创建一个空的项目(taotao)
创建完成后的效果
3.2创建taotao-parent(选择File---->new----->Module)
taotao-parent工程的pom.xml文件中的jar
4.12
4.2.4.RELEASE
3.2.8
1.2.2
1.2.15
5.1.32
1.6.4
2.4.2
1.0.9
4.3.5
1.2
2.5
2.0
2.5
3.3.2
1.3.2
3.3
3.4.2
0.9.1
1.3.1
2.7.2
4.10.3
2.5.3
3.4.7
0.1
5.13.0
2.3.23
2.2.2
joda-time
joda-time
${joda-time.version}
org.apache.commons
commons-lang3
${commons-lang3.version}
org.apache.commons
commons-io
${commons-io.version}
commons-net
commons-net
${commons-net.version}
com.fasterxml.jackson.core
jackson-databind
${jackson.version}
org.apache.httpcomponents
httpclient
${httpclient.version}
org.quartz-scheduler
quartz
${quartz.version}
junit
junit
${junit.version}
test
org.slf4j
slf4j-log4j12
${slf4j.version}
org.mybatis
mybatis
${mybatis.version}
org.mybatis
mybatis-spring
${mybatis.spring.version}
com.github.miemiedev
mybatis-paginator
${mybatis.paginator.version}
com.github.pagehelper
pagehelper
${pagehelper.version}
mysql
mysql-connector-java
${mysql.version}
com.alibaba
druid
${druid.version}
org.springframework
spring-context
${spring.version}
org.springframework
spring-beans
${spring.version}
org.springframework
spring-webmvc
${spring.version}
org.springframework
spring-jdbc
${spring.version}
org.springframework
spring-aspects
${spring.version}
org.springframework
spring-jms
${spring.version}
org.springframework
spring-context-support
${spring.version}
jstl
jstl
${jstl.version}
javax.servlet
servlet-api
${servlet-api.version}
provided
javax.servlet
jsp-api
${jsp-api.version}
provided
commons-fileupload
commons-fileupload
${commons-fileupload.version}
redis.clients
jedis
${jedis.version}
org.apache.solr
solr-solrj
${solrj.version}
com.alibaba
dubbo
${dubbo.version}
org.apache.zookeeper
zookeeper
${zookeeper.version}
com.github.sgroschupf
zkclient
${zkclient.version}
org.apache.activemq
activemq-all
${activemq.version}
org.freemarker
freemarker
${freemarker.version}
${project.artifactId}
org.apache.maven.plugins
maven-resources-plugin
2.7
UTF-8
org.apache.maven.plugins
maven-compiler-plugin
3.2
1.8
UTF-8
org.apache.tomcat.maven
tomcat7-maven-plugin
2.2
org.apache.maven.plugins
maven-surefire-plugin
2.12.4
3.3创建taotao-common(选中taotao-parent目录鼠标右键----new----->Module)
这里出现的原图是这样的,但是要修改(注意!!!!!!!!!!!!!!!!!!)
修改后
taotao-common的pom.xml文件的依赖
joda-time
joda-time
org.apache.commons
commons-lang3
org.apache.commons
commons-io
commons-net
commons-net
com.fasterxml.jackson.core
jackson-databind
org.apache.httpcomponents
httpclient
org.quartz-scheduler
quartz
junit
junit
org.slf4j
slf4j-log4j12
3.3 创建taotao-manage-pojo(选中taotao-manager目录鼠标右键----new----->Module)
原图的效果,但是要修改(注意!!)
修改后的效果
3.4 (taotao-manager-dao、taotao-manager-interface的创建方式和taotao-manage-pojo方式一样就不做演示了)
3.5创建taotao-manager-service(选中taotao-manager目录鼠标右键----new----->Module)
到这里把taotao-manager-service自动生成pom.xml里面多余的东西删除.
3.6创建taotao-manager-web(选中taotao-parent---->new------>Module)
到这里还要删除taotao-manager-service中自动生成的多余的pom.xml文件中的东西
到这里基本上创建项目已经完成了,但是还有pom.xml文件中的依赖还没有给出,所以下面是所有的pom.xml文件中的依赖.
4.(pom.ml)中的依赖
4.1(taotao-parent中的pom.xml文件的依赖)
4.12
4.2.4.RELEASE
3.2.8
1.2.2
1.2.15
5.1.32
1.6.4
2.4.2
1.0.9
4.3.5
1.2
2.5
2.0
2.5
3.3.2
1.3.2
3.3
3.4.2
0.9.1
1.3.1
2.7.2
4.10.3
2.5.3
3.4.7
0.1
5.13.0
2.3.23
2.2.2
joda-time
joda-time
${joda-time.version}
org.apache.commons
commons-lang3
${commons-lang3.version}
org.apache.commons
commons-io
${commons-io.version}
commons-net
commons-net
${commons-net.version}
com.fasterxml.jackson.core
jackson-databind
${jackson.version}
org.apache.httpcomponents
httpclient
${httpclient.version}
org.quartz-scheduler
quartz
${quartz.version}
junit
junit
${junit.version}
test
org.slf4j
slf4j-log4j12
${slf4j.version}
org.mybatis
mybatis
${mybatis.version}
org.mybatis
mybatis-spring
${mybatis.spring.version}
com.github.miemiedev
mybatis-paginator
${mybatis.paginator.version}
com.github.pagehelper
pagehelper
${pagehelper.version}
mysql
mysql-connector-java
${mysql.version}
com.alibaba
druid
${druid.version}
org.springframework
spring-context
${spring.version}
org.springframework
spring-beans
${spring.version}
org.springframework
spring-webmvc
${spring.version}
org.springframework
spring-jdbc
${spring.version}
org.springframework
spring-aspects
${spring.version}
org.springframework
spring-jms
${spring.version}
org.springframework
spring-context-support
${spring.version}
jstl
jstl
${jstl.version}
javax.servlet
servlet-api
${servlet-api.version}
provided
javax.servlet
jsp-api
${jsp-api.version}
provided
commons-fileupload
commons-fileupload
${commons-fileupload.version}
redis.clients
jedis
${jedis.version}
org.apache.solr
solr-solrj
${solrj.version}
com.alibaba
dubbo
${dubbo.version}
org.apache.zookeeper
zookeeper
${zookeeper.version}
com.github.sgroschupf
zkclient
${zkclient.version}
org.apache.activemq
activemq-all
${activemq.version}
org.freemarker
freemarker
${freemarker.version}
${project.artifactId}
org.apache.maven.plugins
maven-resources-plugin
2.7
UTF-8
org.apache.maven.plugins
maven-compiler-plugin
3.2
1.8
UTF-8
org.apache.tomcat.maven
tomcat7-maven-plugin
2.2
org.apache.maven.plugins
maven-surefire-plugin
2.12.4
4.2(taotao-common中的pom.xml文件的依赖)
joda-time
joda-time
org.apache.commons
commons-lang3
org.apache.commons
commons-io
commons-net
commons-net
com.fasterxml.jackson.core
jackson-databind
org.apache.httpcomponents
httpclient
org.quartz-scheduler
quartz
junit
junit
org.slf4j
slf4j-log4j12
4.3(taotao-manager中的pom.xml文件的依赖)
com.taotao
taotao-common
1.0-SNAPSHOT
org.apache.tomcat.maven
tomcat7-maven-plugin
8080
/
4.4(taotao-manager-dao中的pom.xml文件的依赖)
com.taotao
taotao-manager-pojo
1.0-SNAPSHOT
org.mybatis
mybatis
org.mybatis
mybatis-spring
com.github.miemiedev
mybatis-paginator
com.github.pagehelper
pagehelper
mysql
mysql-connector-java
com.alibaba
druid
org.junit.jupiter
junit-jupiter-api
RELEASE
test
org.springframework
spring-beans
test
src/main/java
**/*.properties
**/*.xml
false
4.5(taotao-manager-interface中的pom.xml文件的依赖)
com.taotao
taotao-manager-pojo
1.0-SNAPSHOT
4.6(taotao-manager-service中的pom.xml文件的依赖)
com.taotao
taotao-manager-dao
1.0-SNAPSHOT
com.taotao
taotao-manager-interface
1.0-SNAPSHOT
org.springframework
spring-context
org.springframework
spring-beans
org.springframework
spring-webmvc
org.springframework
spring-jdbc
org.springframework
spring-aspects
org.springframework
spring-jms
org.springframework
spring-context-support
com.alibaba
dubbo
org.springframework
spring
org.jboss.netty
netty
org.apache.zookeeper
zookeeper
com.github.sgroschupf
zkclient
4.7(taotao-manager-web中的pom.xml文件的依赖)
org.springframework
spring-context
org.springframework
spring-beans
org.springframework
spring-webmvc
org.springframework
spring-jdbc
org.springframework
spring-aspects
org.springframework
spring-jms
org.springframework
spring-context-support
jstl
jstl
javax.servlet
servlet-api
provided
javax.servlet
jsp-api
provided
commons-fileupload
commons-fileupload
com.alibaba
dubbo
org.springframework
spring
org.jboss.netty
netty
org.apache.zookeeper
zookeeper
com.github.sgroschupf
zkclient
com.taotao
taotao-manager-interface
1.0-SNAPSHOT
compile
org.apache.tomcat.maven
tomcat7-maven-plugin
8081
/
4.8(taotao-manager-interface中的pom.xml文件的依赖)
该子工程中没有依赖
5.到这里项目基本上已经创建完成了,接下来就是运行测试
5.1选中taotao-manager项目鼠标右键
项目在8080端口启动
5.2选中taotao-manager-web项目鼠标右键
项目在8081端口启动l
到此,项目在IDEA下基本上创建完成!