项目作者: ayhyh

项目描述 :
springboot-admin是基于`springboot2.0.1` 前端采用`vue-element-admin`组件的快速开发脚手架单体服务。
高级语言: Vue
项目地址: git://github.com/ayhyh/springboot-admin-ui.git
创建时间: 2019-03-09T15:33:46Z
项目社区:https://github.com/ayhyh/springboot-admin-ui

开源协议:

下载


准备工作

  • node.js环境(npm包管理器)
  • vue-cli 脚手架构建工具
  • cnpm npm的淘宝镜像

开发运行

  1. # 安装依赖
  2. npm install
  3. //or # 建议不要用cnpm 安装有各种诡异的bug 可以通过如下操作解决npm速度慢的问题
  4. npm install --registry=https://registry.npm.taobao.org
  5. # 本地开发 开启服务
  6. npm run dev

浏览器访问 http://localhost:9527

发布

  1. # 发布测试环境 带webpack ananalyzer
  2. npm run build:sit-preview
  3. # 构建生成环境
  4. npm run build:prod

部署nginx配置参考

  1. location / {
  2. # 指向我们打包后上传的前端文件
  3. root /opt/nginx/dist;
  4. index index.html;
  5. }
  6. location /jwt/ {
  7. # 转发请求到后端服务网关
  8. proxy_pass http://127.0.0.1:8765/jwt/;
  9. }
  10. location /api/ {
  11. proxy_pass http://127.0.0.1:8765/api/;
  12. }

目录结构

  1. ├── build // 构建相关
  2. ├── config // 配置相关
  3. ├── src // 源代码
  4. ├── api // 所有请求
  5. ├── assets // 主题 字体等静态资源
  6. ├── components // 全局公用组件
  7. ├── directive // 全局指令
  8. ├── filtres // 全局filter
  9. ├── mock // mock数据
  10. ├── router // 路由
  11. ├── store // 全局store管理
  12. ├── styles // 全局样式
  13. ├── utils // 全局公用方法
  14. ├── view // view
  15. ├── App.vue // 入口页面
  16. └── main.js // 入口 加载组件 初始化等
  17. ├── static // 第三方不打包资源
  18. ├── jquery
  19. └── Tinymce // 富文本
  20. ├── .babelrc // babel-loader 配置
  21. ├── eslintrc.js // eslint 配置项
  22. ├── .gitignore // git 忽略项
  23. ├── favicon.ico // favicon图标
  24. ├── index.html // html模板
  25. └── package.json // package.json

状态管理

后台只有user和app配置相关状态使用vuex存在全局,其它数据都由每个业务页面自己管理。

License

Apache License Version 2.0