聚星Note01 - 后台管理环境搭建(1)

本文档详细介绍了如何使用IDEA创建SSM项目的父工程和子模块,包括添加web.xml配置、设置模块间依赖及执行MyBatis逆向工程生成实体类和Mapper文件,适合初学者学习。
摘要由CSDN通过智能技术生成

1 项目概述

1.1 版权声明

        聚星,gatherStars,项目原型来源于尚硅谷旗下的尚筹网项目,本人仅用于学习,无任何商业用途。
        聚星分为后台管理系统(SSM)和前台会员系统(SpringBoot+SpringCloud)。

1.2 鸣谢

        非常感谢尚硅谷开源相关视频供他人学习!

 

2 idea 创建工程

2.1 创建 maven 父工程

// 创建规则
groupId: com.turling.gatherStars
artifactId: gatherStars-admin-parent
packaging: pom

// idea 修改工程 maven 依赖仓库的路径
File -- Settings -- Build, Execution, Deployment -- Build Tools -- Maven

// * gatherStars-admin-parent 仅提供依赖管理功能,故可删去src目录

2.2 创建 maven 子模块

// 在 gatherStars-admin-parent 父工程下
// 1. 创建子模块 gatherStars-admin-webui
groupId: com.turling.gatherStars
artifactId: gatherStars-admin-webui
packaging: war

// 2. 创建子模块 gatherStars-admin-component
groupId: com.turling.gatherStars
artifactId: gatherStars-admin-component
packaging: jar

// 3. 创建子模块 gatherStars-admin-entity
groupId: com.turling.gatherStars
artifactId: gatherStars-admin-entity
packaging: jar

// * 按照父工程样式在各模块的 pom.xml 文件中添加打包方式
<packaging>your_packaging</packaging>

2.3 创建 maven 其他模块

// 新建 Maven Module - gatherStars-admin-util
groupId: com.turling.gatherStars
artifactId: gatherStars-admin-util
packaging: jar

// 新建 Maven Module - gatherStars-admin-reverse
groupId: com.turling.gatherStars
artifactId: gatherStars-admin-reverse
packaging: jar

// * 按照 gatherStars-admin-parent 样式在各模块的 pom.xml 文件中添加打包方式
<packaging>your_packaging</packaging>
图1:新建 Maven Module 设置页面1
* 图示已去水印,供下载使用
图2:新建 Maven Module 设置页面2
* 图示已去水印,供下载使用

 

3 添加文件和依赖

3.1 gatherStars-admin-webui 模块下添加 web.xml 文件

3.1.1 配置 idea 创建 xml 文件

// 默认进入idea时,新建文件栏不显示xml入口
File -- Settings -- Editor -- File and Code Templates -- 点击"+"
图3:idea 配置 xml文件
* 图示已去水印,供下载使用
// 输入模版
<?xml version="1.0" encoding="UTF-8"?>

3.1.2 添加 web.xml 文件,并做相关配置

1. src/main目录下创建 /webapp/WEB-INF/web.xml
2. 点击File -- Project Structure -- Facts -- 点击"+" -- 选择"Web" -- 选择"...webui"子模块
3. Path 为 ...\gatherStars-admin-webui\src\main\webapp\WEB-INF\web.xml
4. Web Resource Directory 为 ...\gatherStars-admin-webui\src\main\webapp
图4:相关配置页面1
* 图示已去水印,供下载使用
图5:相关配置页面2
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值