1 项目视图
2 创建
2.1 总目录 空项目
2.1.1 第一步
2.1.2 第二步
2.1.3 第三步 结果
2.2 父工程 e3-parent
2.2.1 第一步
选择File–>New–>Module,进入New Module页面:
2.2.2 第二步
2.2.3 第三步
2.2.4 第四步 指定maven
2.2.5 第五步 指定路径
2.2.6 第六步 修改pom.xml
2.2.7 第七步 删掉main
2.3 父工程 e3-common 继承
2.3.1 第一步
选中父工程,再次file->new->module->next…这次是新建子工程,就要按自己的需要选择模板了,我这里选个web的。
2.3.2 第二步 清除父模块
由于这个是和e3同级,不存在儿子关系
2.3.3 第三步
2.3.4 第四步 修改pom.xml
2.3.5 第五步 删除 webapp
2.3.6 其他:
父工程e3-manager 继承
2.4 子工程e3-manager-pojo
2.4.1 第一步
选中父工程,再次file->new->module->next…这次是新建子工程,就要按自己的需要选择模板了,我这里选个web的。
2.4.2 第二步 添加父模块
2.4.3 第三步
2.4.4 第四步 修改pom.xml
2.4.5 第五步 删除 webapp
2.4.6 其他
子工程类似
类似,改为war,不删除
2.5 E3-magger
唯一区别
3 配置
3.1 基本配置
3.2 Maven服务器
启动tomcat插件:
clean tomcat7:run
3.3 先部署
可能是common-parent和common-utils没有安装到本地仓库,出现的错误是找不到common-utils的jar包,那就需要我们安装一下。
4 文件
4.1 e3-parent
4.1.1 pom.xml
- <modelVersion>4.0.0</modelVersion>
- <groupId>cn.e3mall</groupId>
- <artifactId>e3-parent</artifactId>
- <packaging>pom</packaging>
- <version>1.0-SNAPSHOT</version>
- <name>e3-parent</name>
- <url>http://maven.apache.org</url>
- <!-- 集中定义依赖版本号-->
- <properties>
- <junit.version>4.12</junit.version>
- <spring.version>4.2.4.RELEASE</spring.version>
- <aspectjweaver.version>1.6.8</aspectjweaver.version>
- <aopalliance.version>1.0</aopalliance.version>
- <mybatis.version>3.2.8</mybatis.version>
- <mybatis.spring.version>1.2.2</mybatis.spring.version>
- <mybatis.paginator.version>1.2.15</mybatis.paginator.version>
- <mysql.version>5.1.32</mysql.version>
- <slf4j.version>1.6.4</slf4j.version>
- <jackson.version>2.4.2</jackson.version>
- <fastjson.version>1.2.38</fastjson.version>
- <druid.version>1.0.9</druid.version>
- <httpclient.version>4.3.5</httpclient.version>
- <jstl.version>1.2</jstl.version>
- <servlet-api.version>2.5</servlet-api.version>
- <jsp-api.version>2.0</jsp-api.version>
- <joda-time.version>2.5</joda-time.version>
- <commons-lang3.version>3.3.2</commons-lang3.version>
- <commons-io.version>1.3.2</commons-io.version>
- <commons-net.version>3.3</commons-net.version>
- <pagehelper.version>5.0.0</pagehelper.version>
- <jsqlparser.version>0.9.1</jsqlparser.version>
- <commons-fileupload.version>1.3.1</commons-fileupload.version>
- <jedis.version>2.7.2</jedis.version>
- <solrj.version>4.10.3</solrj.version>
- <dubbo.version>2.5.3</dubbo.version>
- <zookeeper.version>3.4.7</zookeeper.version>
- <zkclient.version>0.1</zkclient.version>
- <activemq.version>5.11.2</activemq.version>
- <freemarker.version>2.3.23</freemarker.version>
- <quartz.version>2.2.2</quartz.version>
- </properties>
- <dependencyManagement>
- <dependencies>
- <!-- 时间操作组件 -->
- <dependency>
- <groupId>joda-time</groupId>
- <artifactId>joda-time</artifactId>
- <version>${joda-time.version}</version>
- </dependency>
- <!-- Apache工具组件 -->
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-lang3</artifactId>
- <version>${commons-lang3.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-io</artifactId>
- <version>${commons-io.version}</version>
- </dependency>
- <dependency>
- <groupId>commons-net</groupId>
- <artifactId>commons-net</artifactId>
- <version>${commons-net.version}</version>
- </dependency>
- <!-- Jackson Json处理工具包 -->
- <dependency>
- <groupId>com.fasterxml.jackson.core</groupId>
- <artifactId>jackson-databind</artifactId>
- <version>${jackson.version}</version>
- </dependency>
- <!-- https://mvnrepository.com/artifact/com.alibaba/fastjson
- 支持JSONObject-->
- <dependency>
- <groupId>com.alibaba</groupId>
- <artifactId>fastjson</artifactId>
- <version>${fastjson.version}</version>
- </dependency>
- <!-- httpclient -->
- <dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpclient</artifactId>
- <version>${httpclient.version}</version>
- </dependency>
- <!-- quartz任务调度框架 -->
- <dependency>
- <groupId>org.quartz-scheduler</groupId>
- <artifactId>quartz</artifactId>
- <version>${quartz.version}</version>
- </dependency>
- <!-- 单元测试 -->
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>${junit.version}</version>
- <scope>test</scope>
- </dependency>
- <!-- 日志处理 -->
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- <version>${slf4j.version}</version>
- </dependency>
- <!-- Mybatis -->
- <dependency>
- <groupId>org.mybatis</groupId>
- <artifactId>mybatis</artifactId>
- <version>${mybatis.version}</version>
- </dependency>
- <dependency>
- <groupId>org.mybatis</groupId>
- <artifactId>mybatis-spring</artifactId>
- <version>${mybatis.spring.version}</version>
- </dependency>
- <dependency>
- <groupId>com.github.miemiedev</groupId>
- <artifactId>mybatis-paginator</artifactId>
- <version>${mybatis.paginator.version}</version>
- </dependency>
- <dependency>
- <groupId>com.github.pagehelper</groupId>
- <artifactId>pagehelper</artifactId>
- <version>${pagehelper.version}</version>
- </dependency>
- <!-- MySql -->
- <dependency>
- <groupId>mysql</groupId>
- <artifactId>mysql-connector-java</artifactId>
- <version>${mysql.version}</version>
- </dependency>
- <!-- 连接池 -->
- <dependency>
- <groupId>com.alibaba</groupId>
- <artifactId>druid</artifactId>
- <version>${druid.version}</version>
- </dependency>
- <!-- Spring -->
- <!-- Spring Core -->
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-core</artifactId>
- <version>${spring.version}</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-beans</artifactId>
- <version>${spring.version}</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId