宜立方商城 工程搭建 项目(二)续
2017-11-06 21:16
281 查看
e3-manager-dao
pom文件
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion>
<parent>
<groupId>cn.e3mall</groupId>
<artifactId>e3-manager</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>e3-manager-[u]dao[/u]</artifactId>
<dependencies>
<dependency>
<groupId>cn.e3mall</groupId>
<artifactId>e3-manager-[u]pojo[/u]</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<!--
添加对[u]mybatis[/u]的依赖
-->
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>[u]mybatis[/u]</artifactId>
</dependency>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>[u]mybatis[/u]-spring</artifactId>
</dependency>
<dependency>
<groupId>com.github.miemiedev</groupId>
<artifactId>[u]mybatis[/u]-[u]paginator[/u]</artifactId>
</dependency>
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>[u]pagehelper[/u]</artifactId>
</dependency>
<!--
MySql -->
<dependency>
<groupId>[u]mysql[/u]</groupId>
<artifactId>[u]mysql[/u]-connector-java</artifactId>
</dependency>
<!--
连接池 -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>[u]druid[/u]</artifactId>
</dependency>
</dependencies>
</project>
e3-manager-interface
pom文件
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion>
<parent>
[u]<groupId>cn.e3mall</groupId>[/u]
[u]<artifactId>e3-manager</artifactId>[/u]
[u]<version>0.0.1-SNAPSHOT</version>[/u]
</parent>
<artifactId>e3-manager-interface</artifactId>
<dependencies>
<dependency>
<groupId>cn.e3mall</groupId>
<artifactId>e3-manager-[u]pojo[/u]</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
e3-manager-service
打包方式jar包。
pom文件
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion>
<parent>
<groupId>cn.e3mall</groupId>
<artifactId>e3-manager</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>e3-manager-service</artifactId>
<dependencies>
<dependency>
<groupId>cn.e3mall</groupId>
<artifactId>e3-manager-[u]dao[/u]</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>cn.e3mall</groupId>
<artifactId>e3-manager-interface</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<!--
spring的依赖 -->
<!--
Spring -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-[u]webmvc[/u]</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-[u]jdbc[/u]</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-[u]jms[/u]</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
</dependency>
</dependencies>
</project>
e3-manager-web
表现层,打包方式war。
pom文件
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion>
<parent>
<groupId>cn.e3mall</groupId>
<artifactId>e3-manager</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>e3-manager-web</artifactId>
<packaging>war</packaging>
<dependencies>
<dependency>
<groupId>cn.e3mall</groupId>
<artifactId>e3-manager-service</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<!--
JSP相关 -->
<dependency>
<groupId>[u]jstl[/u]</groupId>
<artifactId>[u]jstl[/u]</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>[u]servlet[/u]-[u]api[/u]</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>[u]jsp[/u]-[u]api[/u]</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
</project>
[b]补全目录结构[/b]
由于打包方式为war需要补全目录结构,需要在webapp目录下添加WEB-INF目录,和web.xml文件。web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<display-name>e3-manager-web</display-name>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
[b]添加欢迎页[/b]
[b]
[/b]
<%@ page language="java" contentType="text/html;
charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD
HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
<title>Insert
title here</title>
</head>
<body>
<h1>hello
宜立方商城</h1>
</body>
</html>
启动工程
需要在e3-manager
的pom工程中,配置tomcat插件。启动的端口号,和工程名称。
在e3-manager的pom文件中添加如下配置:
<!-- 配置[u]tomcat[/u]插件
-->
<build>
<plugins>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-[u]maven[/u]-[u]plugin[/u]</artifactId>
<configuration>
<port>8080</port>
<path>/</path>
</configuration>
</plugin>
</plugins>
</build>
启动tomcat插件:
clean tomcat7:run
先把e3-parent、e3-common安装到本地仓库。然后再启动。
相关文章推荐
- 宜立方商城 工程搭建 项目(二)
- 商城项目实战26:CMS内容管理系统工程搭建
- 【SSM实战】lee_shop商城(一)搭建基于Maven的SSM工程
- ThinkPHP5.0商城项目目录搭建(菜鸟)
- 框架 day73 涛涛商城项目工程搭建(maven)
- 移动商城第一篇【搭建项目环境】
- Mac android原生工程中潜入react-native混合开发项目搭建
- 【SSH网上商城项目实战03】使用EasyUI搭建后台页面框架
- ssm-商城项目搭建
- 项目中服务端搭建工程用到的技术
- 网上商城项目实战之使用nexus搭建maven私有服务器
- 【SSH网上商城项目实战03】使用EasyUI搭建后台页面框架
- newstyles项目实战(十三)前台系统搭建分析、服务层工程搭建
- automake搭建项目工程例子讲解
- 移动商城第一篇【搭建项目环境】
- 尚硅谷Android项目之_硅谷商城项目全套源码解析(二、主框架搭建)
- android 项目工程之框架搭建
- gradle工程环境搭建---从SVN上导出项目源码
- 搭建的maven项目中pom文件中的jar全部不能导入到工程里面解决
- SSM综合项目实战(TTSC) -- day01 项目介绍、工程搭建