Spring Boot 開源項目實錄(一):Mall


 

 

mall項目是一套電商系統,包括前台商城系統及后台管理系統,基於SpringBoot+MyBatis實現。 前台商城系統包含首頁門戶、商品推薦、商品搜索、商品展示、購物車、訂單流程、會員中心、客戶服務、幫助中心等模塊。 后台管理系統包含商品管理、訂單管理、會員管理、促銷管理、運營管理、內容管理、統計報表、財務管理、權限管理、設置等模塊。

https://github.com/macrozheng/mall

 

mall-admin-web是一個電商后台管理系統的前端項目,基於Vue+Element實現。 主要包括商品管理、訂單管理、會員管理、促銷管理、運營管理、內容管理、統計報表、財務管理、權限管理、設置等功能。

https://github.com/macrozheng/mall-admin-web

技術選型

后端技術

 

技術 說明 官網
Spring Boot 容器+MVC框架 https://spring.io/projects/spring-boot
Spring Security 認證和授權框架 https://spring.io/projects/spring-security
MyBatis ORM框架 http://www.mybatis.org/mybatis-3/zh/index.html
MyBatisGenerator 數據層代碼生成 http://www.mybatis.org/generator/index.html
PageHelper MyBatis物理分頁插件 http://git.oschina.net/free/Mybatis_PageHelper
Swagger-UI 文檔生產工具 https://github.com/swagger-api/swagger-ui
Hibernator-Validator 驗證框架 http://hibernate.org/validator/
Elasticsearch 搜索引擎 https://github.com/elastic/elasticsearch
RabbitMq 消息隊列 https://www.rabbitmq.com/
Redis 分布式緩存 https://redis.io/
MongoDb NoSql數據庫 https://www.mongodb.com/
Docker 應用容器引擎 https://www.docker.com/
Druid 數據庫連接池 https://github.com/alibaba/druid
OSS 對象存儲 https://github.com/aliyun/aliyun-oss-java-sdk
JWT JWT登錄支持 https://github.com/jwtk/jjwt
LogStash 日志收集 https://github.com/logstash/logstash-logback-encoder
Lombok 簡化對象封裝工具 https://github.com/rzwitserloot/lombok

前端技術

技術 說明 官網
Vue 前端框架 https://vuejs.org/
Vue-router 路由框架 https://router.vuejs.org/
Vuex 全局狀態管理框架 https://vuex.vuejs.org/
Element 前端UI框架 https://element.eleme.io/
Axios 前端HTTP框架 https://github.com/axios/axios
v-charts 基於Echarts的圖表框架 https://v-charts.js.org/
Js-cookie cookie管理工具 https://github.com/js-cookie/js-cookie
nprogress 進度條控件 https://github.com/rstacruz/nprogress

 

 

項目相關文檔

具體詳見wiki:https://github.com/macrozheng/mall/wiki

參考資料

 

 

環境搭建

開發工具

工具 說明 官網
IDEA 開發IDE https://www.jetbrains.com/idea/download
RedisDesktop redis客戶端連接工具 https://redisdesktop.com/download
Robomongo mongo客戶端連接工具 https://robomongo.org/download
SwitchHosts 本地host管理 https://oldj.github.io/SwitchHosts/
X-shell Linux遠程連接工具 http://www.netsarang.com/download/software.html
Navicat 數據庫連接工具 http://www.formysql.com/xiazai.html
PowerDesigner 數據庫設計工具 http://powerdesigner.de/
Axure 原型設計工具 https://www.axure.com/
MindMaster 思維導圖設計工具 http://www.edrawsoft.cn/mindmaster
ScreenToGif gif錄制工具 https://www.screentogif.com/
ProcessOn 流程圖繪制工具 https://www.processon.com/
PicPick 屏幕取色工具 https://picpick.app/zh/

開發環境

工具 版本號 下載
JDK 1.8 https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Mysql 5.7 https://www.mysql.com/
Redis 3.2 https://redis.io/download
Elasticsearch 6.2.2 https://www.elastic.co/downloads
MongoDb 3.2 https://www.mongodb.com/download-center
RabbitMq 3.7.14 http://www.rabbitmq.com/download.html
nginx 1.10 http://nginx.org/en/download.html

搭建步驟

本地環境搭建

  • 本地安裝開發環境中的所有工具並啟動(只啟動mall-admin,僅需安裝mysql),具體參考deploy-windows.md;
  • 克隆源代碼到本地,使用IDEA或Eclipse打開,並完成編譯;
  • 在mysql中新建mall數據庫,導入document/sql下的mall.sql文件;
  • 啟動mall-admin項目:直接運行com.macro.mall.MallAdminApplication的main方法即可, 接口文檔地址:http://localhost:8080/swagger-ui.html;
  • 啟動mall-search項目:直接運行com.macro.mall.search.MallSearchApplication的main方法即可, 接口文檔地址:http://localhost:8081/swagger-ui.html;
  • 啟動mall-portal項目:直接運行com.macro.mall.portal.MallPortalApplication的main方法即可, 接口文檔地址:http://localhost:8085/swagger-ui.html;
  • 克隆mall-admin-web項目,並導入到IDEA中完成編譯傳送門;
  • 在IDEA命令行中運行命令:npm install,下載相關依賴;
  • 在IDEA命令行中運行命令:npm run dev,訪問地址:http://localhost:8090 即可打開后台管理系統頁面;
  • ELK日志收集系統的搭建:參考elk.md

docker環境部署

  • 在VirtualBox或其他環境中安裝CenterOs7.2;
  • 使用maven構建mall-adminmall-searchmall-portal的docker鏡像,參考docker.md中的使用maven構建Docker鏡像;
  • docker下環境安裝及部署請參考docker-deploy.md


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM