聚星Note01 - 后台管理环境搭建1
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>
* 图示已去水印,供下载使用
* 图示已去水印,供下载使用
3 添加文件和依赖
3.1 gatherStars-admin-webui 模块下添加 web.xml 文件
3.1.1 配置 idea 创建 xml 文件
// 默认进入idea时,新建文件栏不显示xml入口
File -- Settings -- Editor -- File and Code Templates -- 点击"+"
* 图示已去水印,供下载使用
// 输入模版
<?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
* 图示已去水印,供下载使用