](http://godban.github.io/browsers-support-badges/)IE / Edge | [
](http://godban.github.io/browsers-support-badges/)Firefox | [
](http://godban.github.io/browsers-support-badges/)Chrome | [
](http://godban.github.io/browsers-support-badges/)Safari |
84 | | --------- | --------- | --------- | --------- |
85 | | IE10, IE11, Edge| last 2 versions| last 2 versions| last 2 versions
86 |
87 | ## License
88 |
89 | [MIT](https://github.com/PanJiaChen/vue-admin-template/blob/master/LICENSE) license.
90 |
91 | Copyright (c) 2017-present PanJiaChen
92 |
--------------------------------------------------------------------------------
/ssm-vue/README-zh.md:
--------------------------------------------------------------------------------
1 | # vue-admin-template
2 |
3 | > 这是一个极简的 vue admin 管理后台。它只包含了 Element UI & axios & iconfont & permission control & lint,这些搭建后台必要的东西。
4 |
5 | [线上地址](http://panjiachen.github.io/vue-admin-template)
6 |
7 | [国内访问](https://panjiachen.gitee.io/vue-admin-template)
8 |
9 | 目前版本为 `v4.0+` 基于 `vue-cli` 进行构建,若你想使用旧版本,可以切换分支到[tag/3.11.0](https://github.com/PanJiaChen/vue-admin-template/tree/tag/3.11.0),它不依赖 `vue-cli`。
10 |
11 | ## Extra
12 |
13 | 如果你想要根据用户角色来动态生成侧边栏和 router,你可以使用该分支[permission-control](https://github.com/PanJiaChen/vue-admin-template/tree/permission-control)
14 |
15 | ## 相关项目
16 |
17 | - [vue-element-admin](https://github.com/PanJiaChen/vue-element-admin)
18 |
19 | - [electron-vue-admin](https://github.com/PanJiaChen/electron-vue-admin)
20 |
21 | - [vue-typescript-admin-template](https://github.com/Armour/vue-typescript-admin-template)
22 |
23 | - [awesome-project](https://github.com/PanJiaChen/vue-element-admin/issues/2312)
24 |
25 | 写了一个系列的教程配套文章,如何从零构建后一个完整的后台项目:
26 |
27 | - [手摸手,带你用 vue 撸后台 系列一(基础篇)](https://juejin.im/post/59097cd7a22b9d0065fb61d2)
28 | - [手摸手,带你用 vue 撸后台 系列二(登录权限篇)](https://juejin.im/post/591aa14f570c35006961acac)
29 | - [手摸手,带你用 vue 撸后台 系列三 (实战篇)](https://juejin.im/post/593121aa0ce4630057f70d35)
30 | - [手摸手,带你用 vue 撸后台 系列四(vueAdmin 一个极简的后台基础模板,专门针对本项目的文章,算作是一篇文档)](https://juejin.im/post/595b4d776fb9a06bbe7dba56)
31 | - [手摸手,带你封装一个 vue component](https://segmentfault.com/a/1190000009090836)
32 |
33 | ## Build Setup
34 |
35 | ```bash
36 | # 克隆项目
37 | git clone https://github.com/PanJiaChen/vue-admin-template.git
38 |
39 | # 进入项目目录
40 | cd vue-admin-template
41 |
42 | # 安装依赖
43 | npm install
44 |
45 | # 建议不要直接使用 cnpm 安装以来,会有各种诡异的 bug。可以通过如下操作解决 npm 下载速度慢的问题
46 | npm install --registry=https://registry.npm.taobao.org
47 |
48 | # 启动服务
49 | npm run dev
50 | ```
51 |
52 | 浏览器访问 [http://localhost:9528](http://localhost:9528)
53 |
54 | ## 发布
55 |
56 | ```bash
57 | # 构建测试环境
58 | npm run build:stage
59 |
60 | # 构建生产环境
61 | npm run build:prod
62 | ```
63 |
64 | ## 其它
65 |
66 | ```bash
67 | # 预览发布环境效果
68 | npm run preview
69 |
70 | # 预览发布环境效果 + 静态资源分析
71 | npm run preview -- --report
72 |
73 | # 代码格式检查
74 | npm run lint
75 |
76 | # 代码格式检查并自动修复
77 | npm run lint -- --fix
78 | ```
79 |
80 | 更多信息请参考 [使用文档](https://panjiachen.github.io/vue-element-admin-site/zh/)
81 |
82 | ## Demo
83 |
84 | 
85 |
86 | ## Browsers support
87 |
88 | Modern browsers and Internet Explorer 10+.
89 |
90 | | [
](http://godban.github.io/browsers-support-badges/)IE / Edge | [
](http://godban.github.io/browsers-support-badges/)Firefox | [
](http://godban.github.io/browsers-support-badges/)Chrome | [
](http://godban.github.io/browsers-support-badges/)Safari |
91 | | --------- | --------- | --------- | --------- |
92 | | IE10, IE11, Edge| last 2 versions| last 2 versions| last 2 versions
93 |
94 | ## License
95 |
96 | [MIT](https://github.com/PanJiaChen/vue-admin-template/blob/master/LICENSE) license.
97 |
98 | Copyright (c) 2017-present PanJiaChen
99 |
--------------------------------------------------------------------------------
/ssm_project/ssm_project_web/src/main/java/com/zephon/controller/RoleController.java:
--------------------------------------------------------------------------------
1 | package com.zephon.controller;
2 |
3 | import com.github.pagehelper.PageInfo;
4 | import com.zephon.domain.Permission;
5 | import com.zephon.domain.Role;
6 | import com.zephon.entity.Result;
7 | import com.zephon.entity.ResultCode;
8 | import com.zephon.service.IRoleService;
9 | import org.apache.shiro.authz.annotation.RequiresPermissions;
10 | import org.springframework.beans.factory.annotation.Autowired;
11 | import org.springframework.web.bind.annotation.DeleteMapping;
12 | import org.springframework.web.bind.annotation.GetMapping;
13 | import org.springframework.web.bind.annotation.PathVariable;
14 | import org.springframework.web.bind.annotation.PostMapping;
15 | import org.springframework.web.bind.annotation.RequestBody;
16 | import org.springframework.web.bind.annotation.RequestParam;
17 | import org.springframework.web.bind.annotation.RestController;
18 |
19 | import java.util.Arrays;
20 | import java.util.List;
21 |
22 | /**
23 | * @author Zephon
24 | * @version V1.0
25 | * @Package com.zephon.controller
26 | * @date 2020/3/27 下午2:34
27 | * @Copyright ©
28 | */
29 | @RestController
30 | public class RoleController {
31 | @Autowired
32 | private IRoleService roleService;
33 | @GetMapping("/roles")
34 | @RequiresPermissions("/role/findAll")
35 | public Result findAll(){
36 | List