Commit d50fa8ed2296ea401597e719b3e424aaee73318f

Authored by YunaiV
1 parent 80544e43

1. 增加 swagger 菜单

2. 增加 spring boot admin 菜单
Showing 29 changed files with 60 additions and 284 deletions
README.md
... ... @@ -43,8 +43,7 @@
43 43  
44 44 - admin/admin123
45 45  
46   -演示地址:http://vue.ruoyi.vip
47   -文档地址:http://doc.ruoyi.vip
  46 +演示地址:<http://dashboard.yudao.iocoder.cn>
48 47  
49 48 ## 演示图
50 49  
... ...
ruoyi-common/src/main/java/com/ruoyi/common/SwaggerController.java deleted
1   -package com.ruoyi.web.controller.tool;
2   -
3   -import org.springframework.security.access.prepost.PreAuthorize;
4   -import org.springframework.stereotype.Controller;
5   -import org.springframework.web.bind.annotation.GetMapping;
6   -import org.springframework.web.bind.annotation.RequestMapping;
7   -import com.ruoyi.common.core.controller.BaseController;
8   -
9   -/**
10   - * swagger 接口
11   - *
12   - * @author ruoyi
13   - */
14   -@Controller
15   -@RequestMapping("/tool/swagger")
16   -public class SwaggerController extends BaseController {
17   - @PreAuthorize("@ss.hasPermi('tool:swagger:view')")
18   - @GetMapping()
19   - public String index() {
20   - return redirect("/swagger-ui.html");
21   - }
22   -}
ruoyi-ui/README.md
... ... @@ -2,7 +2,7 @@
2 2  
3 3 ```bash
4 4 # 克隆项目
5   -git clone https://gitee.com/y_project/RuoYi-Vue
  5 +git clone https://github.com/YunaiV/ruoyi-vue-pro
6 6  
7 7 # 进入项目目录
8 8 cd ruoyi-ui
... ... @@ -27,4 +27,4 @@ npm run build:stage
27 27  
28 28 # 构建生产环境
29 29 npm run build:prod
30   -```
31 30 \ No newline at end of file
  31 +```
... ...
ruoyi-ui/package.json
... ... @@ -33,7 +33,7 @@
33 33 ],
34 34 "repository": {
35 35 "type": "git",
36   - "url": "https://gitee.com/y_project/RuoYi-Vue.git"
  36 + "url": "https://github.com/YunaiV/ruoyi-vue-pro"
37 37 },
38 38 "dependencies": {
39 39 "@riophae/vue-treeselect": "0.4.0",
... ...
ruoyi-ui/src/api/monitor/server.js deleted
1   -import request from '@/utils/request'
2   -
3   -// 查询服务器详细
4   -export function getServer() {
5   - return request({
6   - url: '/monitor/server',
7   - method: 'get'
8   - })
9   -}
10 0 \ No newline at end of file
ruoyi-ui/src/components/RuoYi/Git/index.vue
... ... @@ -6,10 +6,10 @@
6 6  
7 7 <script>
8 8 export default {
9   - name: 'RuoYiGit',
  9 + name: 'YudaoGit',
10 10 data() {
11 11 return {
12   - url: 'https://gitee.com/y_project/RuoYi-Vue'
  12 + url: 'https://github.com/YunaiV/ruoyi-vue-proe'
13 13 }
14 14 },
15 15 methods: {
... ... @@ -18,4 +18,4 @@ export default {
18 18 }
19 19 }
20 20 }
21   -</script>
22 21 \ No newline at end of file
  22 +</script>
... ...
ruoyi-ui/src/views/index_old.vue
... ... @@ -55,7 +55,7 @@
55 55 size="mini"
56 56 icon="el-icon-cloudy"
57 57 plain
58   - @click="goTarget('https://gitee.com/y_project/RuoYi-Vue')"
  58 + @click="goTarget('https://gitee.com/zhijiantianya/ruoyi-vue-pro')"
59 59 >访问码云</el-button
60 60 >
61 61 <el-button
... ...
ruoyi-ui/src/views/infra/server/index.vue
1 1 <template>
2   - <div class="app-container">
3   - <el-row>
4   - <el-col :span="12" class="card-box">
5   - <el-card>
6   - <div slot="header"><span>CPU</span></div>
7   - <div class="el-table el-table--enable-row-hover el-table--medium">
8   - <table cellspacing="0" style="width: 100%;">
9   - <thead>
10   - <tr>
11   - <th class="is-leaf"><div class="cell">属性</div></th>
12   - <th class="is-leaf"><div class="cell">值</div></th>
13   - </tr>
14   - </thead>
15   - <tbody>
16   - <tr>
17   - <td><div class="cell">核心数</div></td>
18   - <td><div class="cell" v-if="server.cpu">{{ server.cpu.cpuNum }}</div></td>
19   - </tr>
20   - <tr>
21   - <td><div class="cell">用户使用率</div></td>
22   - <td><div class="cell" v-if="server.cpu">{{ server.cpu.used }}%</div></td>
23   - </tr>
24   - <tr>
25   - <td><div class="cell">系统使用率</div></td>
26   - <td><div class="cell" v-if="server.cpu">{{ server.cpu.sys }}%</div></td>
27   - </tr>
28   - <tr>
29   - <td><div class="cell">当前空闲率</div></td>
30   - <td><div class="cell" v-if="server.cpu">{{ server.cpu.free }}%</div></td>
31   - </tr>
32   - </tbody>
33   - </table>
34   - </div>
35   - </el-card>
36   - </el-col>
37   -
38   - <el-col :span="12" class="card-box">
39   - <el-card>
40   - <div slot="header"><span>内存</span></div>
41   - <div class="el-table el-table--enable-row-hover el-table--medium">
42   - <table cellspacing="0" style="width: 100%;">
43   - <thead>
44   - <tr>
45   - <th class="is-leaf"><div class="cell">属性</div></th>
46   - <th class="is-leaf"><div class="cell">内存</div></th>
47   - <th class="is-leaf"><div class="cell">JVM</div></th>
48   - </tr>
49   - </thead>
50   - <tbody>
51   - <tr>
52   - <td><div class="cell">总内存</div></td>
53   - <td><div class="cell" v-if="server.mem">{{ server.mem.total }}G</div></td>
54   - <td><div class="cell" v-if="server.jvm">{{ server.jvm.total }}M</div></td>
55   - </tr>
56   - <tr>
57   - <td><div class="cell">已用内存</div></td>
58   - <td><div class="cell" v-if="server.mem">{{ server.mem.used}}G</div></td>
59   - <td><div class="cell" v-if="server.jvm">{{ server.jvm.used}}M</div></td>
60   - </tr>
61   - <tr>
62   - <td><div class="cell">剩余内存</div></td>
63   - <td><div class="cell" v-if="server.mem">{{ server.mem.free }}G</div></td>
64   - <td><div class="cell" v-if="server.jvm">{{ server.jvm.free }}M</div></td>
65   - </tr>
66   - <tr>
67   - <td><div class="cell">使用率</div></td>
68   - <td><div class="cell" v-if="server.mem" :class="{'text-danger': server.mem.usage > 80}">{{ server.mem.usage }}%</div></td>
69   - <td><div class="cell" v-if="server.jvm" :class="{'text-danger': server.jvm.usage > 80}">{{ server.jvm.usage }}%</div></td>
70   - </tr>
71   - </tbody>
72   - </table>
73   - </div>
74   - </el-card>
75   - </el-col>
76   -
77   - <el-col :span="24" class="card-box">
78   - <el-card>
79   - <div slot="header">
80   - <span>服务器信息</span>
81   - </div>
82   - <div class="el-table el-table--enable-row-hover el-table--medium">
83   - <table cellspacing="0" style="width: 100%;">
84   - <tbody>
85   - <tr>
86   - <td><div class="cell">服务器名称</div></td>
87   - <td><div class="cell" v-if="server.sys">{{ server.sys.computerName }}</div></td>
88   - <td><div class="cell">操作系统</div></td>
89   - <td><div class="cell" v-if="server.sys">{{ server.sys.osName }}</div></td>
90   - </tr>
91   - <tr>
92   - <td><div class="cell">服务器IP</div></td>
93   - <td><div class="cell" v-if="server.sys">{{ server.sys.computerIp }}</div></td>
94   - <td><div class="cell">系统架构</div></td>
95   - <td><div class="cell" v-if="server.sys">{{ server.sys.osArch }}</div></td>
96   - </tr>
97   - </tbody>
98   - </table>
99   - </div>
100   - </el-card>
101   - </el-col>
102   -
103   - <el-col :span="24" class="card-box">
104   - <el-card>
105   - <div slot="header">
106   - <span>Java虚拟机信息</span>
107   - </div>
108   - <div class="el-table el-table--enable-row-hover el-table--medium">
109   - <table cellspacing="0" style="width: 100%;">
110   - <tbody>
111   - <tr>
112   - <td><div class="cell">Java名称</div></td>
113   - <td><div class="cell" v-if="server.jvm">{{ server.jvm.name }}</div></td>
114   - <td><div class="cell">Java版本</div></td>
115   - <td><div class="cell" v-if="server.jvm">{{ server.jvm.version }}</div></td>
116   - </tr>
117   - <tr>
118   - <td><div class="cell">启动时间</div></td>
119   - <td><div class="cell" v-if="server.jvm">{{ server.jvm.startTime }}</div></td>
120   - <td><div class="cell">运行时长</div></td>
121   - <td><div class="cell" v-if="server.jvm">{{ server.jvm.runTime }}</div></td>
122   - </tr>
123   - <tr>
124   - <td colspan="1"><div class="cell">安装路径</div></td>
125   - <td colspan="3"><div class="cell" v-if="server.jvm">{{ server.jvm.home }}</div></td>
126   - </tr>
127   - <tr>
128   - <td colspan="1"><div class="cell">项目路径</div></td>
129   - <td colspan="3"><div class="cell" v-if="server.sys">{{ server.sys.userDir }}</div></td>
130   - </tr>
131   - </tbody>
132   - </table>
133   - </div>
134   - </el-card>
135   - </el-col>
136   -
137   - <el-col :span="24" class="card-box">
138   - <el-card>
139   - <div slot="header">
140   - <span>磁盘状态</span>
141   - </div>
142   - <div class="el-table el-table--enable-row-hover el-table--medium">
143   - <table cellspacing="0" style="width: 100%;">
144   - <thead>
145   - <tr>
146   - <th class="is-leaf"><div class="cell">盘符路径</div></th>
147   - <th class="is-leaf"><div class="cell">文件系统</div></th>
148   - <th class="is-leaf"><div class="cell">盘符类型</div></th>
149   - <th class="is-leaf"><div class="cell">总大小</div></th>
150   - <th class="is-leaf"><div class="cell">可用大小</div></th>
151   - <th class="is-leaf"><div class="cell">已用大小</div></th>
152   - <th class="is-leaf"><div class="cell">已用百分比</div></th>
153   - </tr>
154   - </thead>
155   - <tbody v-if="server.sysFiles">
156   - <tr v-for="sysFile in server.sysFiles">
157   - <td><div class="cell">{{ sysFile.dirName }}</div></td>
158   - <td><div class="cell">{{ sysFile.sysTypeName }}</div></td>
159   - <td><div class="cell">{{ sysFile.typeName }}</div></td>
160   - <td><div class="cell">{{ sysFile.total }}</div></td>
161   - <td><div class="cell">{{ sysFile.free }}</div></td>
162   - <td><div class="cell">{{ sysFile.used }}</div></td>
163   - <td><div class="cell" :class="{'text-danger': sysFile.usage > 80}">{{ sysFile.usage }}%</div></td>
164   - </tr>
165   - </tbody>
166   - </table>
167   - </div>
168   - </el-card>
169   - </el-col>
170   - </el-row>
  2 + <div v-loading="loading" :style="'height:'+ height">
  3 + <iframe ref="iframe" :src="src" frameborder="no" style="width: 100%;height: 100%" scrolling="auto" />
171 4 </div>
172 5 </template>
173   -
174 6 <script>
175   -import { getServer } from "@/api/monitor/server";
176   -
177 7 export default {
178 8 name: "Server",
179 9 data() {
180 10 return {
181   - // 加载层信息
182   - loading: [],
183   - // 服务器信息
184   - server: []
  11 + src: process.env.VUE_APP_BASE_API + "/admin",
  12 + height: document.documentElement.clientHeight - 94.5 + "px;",
  13 + loading: true
185 14 };
186 15 },
187   - created() {
188   - this.getList();
189   - this.openLoading();
190   - },
191   - methods: {
192   - /** 查询服务器信息 */
193   - getList() {
194   - getServer().then(response => {
195   - this.server = response.data;
196   - this.loading.close();
197   - });
198   - },
199   - // 打开加载层
200   - openLoading() {
201   - this.loading = this.$loading({
202   - lock: true,
203   - text: "拼命读取中",
204   - spinner: "el-icon-loading",
205   - background: "rgba(0, 0, 0, 0.7)"
206   - });
207   - }
  16 + mounted: function() {
  17 + const that = this;
  18 +
  19 + setTimeout(() => {
  20 + // 模拟点击【应用】菜单
  21 + that.$refs["iframe"].contentWindow.document.getElementsByClassName('navbar-item')[2].click();
  22 + // 取消加载中
  23 + this.loading = false;
  24 + }, 230);
  25 +
  26 + // 大小变化的监听
  27 + window.onresize = function temp() {
  28 + that.height = document.documentElement.clientHeight - 94.5 + "px;";
  29 + };
208 30 }
209 31 };
210   -</script>
211 32 \ No newline at end of file
  33 +</script>
... ...
ruoyi-ui/src/views/login.vue
... ... @@ -48,7 +48,7 @@
48 48 </el-form>
49 49 <!-- 底部 -->
50 50 <div class="el-login-footer">
51   - <span>Copyright © 2018-2020 ruoyi.vip All Rights Reserved.</span>
  51 + <span>Copyright © 2020-2021 iocoder.cn All Rights Reserved.</span>
52 52 </div>
53 53 </div>
54 54 </template>
... ...
ruoyi-ui/src/views/tool/swagger/index.vue
... ... @@ -8,7 +8,7 @@ export default {
8 8 name: "Swagger",
9 9 data() {
10 10 return {
11   - src: process.env.VUE_APP_BASE_API + "/swagger-ui.html",
  11 + src: process.env.VUE_APP_BASE_API + "/doc.html",
12 12 height: document.documentElement.clientHeight - 94.5 + "px;",
13 13 loading: true
14 14 };
... ...
src/main/java/cn/iocoder/dashboard/modules/infra/controller/redis/RedisController.java
... ... @@ -22,7 +22,7 @@ import java.util.Properties;
22 22  
23 23 import static cn.iocoder.dashboard.common.pojo.CommonResult.success;
24 24  
25   -@Api("Redis 监控 API")
  25 +@Api(tags = "Redis 监控")
26 26 @RestController
27 27 @RequestMapping("/infra/redis")
28 28 public class RedisController {
... ...
src/main/java/cn/iocoder/dashboard/modules/system/controller/auth/SysAuthController.java
... ... @@ -31,7 +31,7 @@ import static cn.iocoder.dashboard.framework.security.core.util.SecurityUtils.ge
31 31 import static cn.iocoder.dashboard.util.servlet.ServletUtils.getClientIP;
32 32 import static cn.iocoder.dashboard.util.servlet.ServletUtils.getUserAgent;
33 33  
34   -@Api("认证 API")
  34 +@Api(tags = "认证")
35 35 @RestController
36 36 @RequestMapping("/")
37 37 public class SysAuthController {
... ...
src/main/java/cn/iocoder/dashboard/modules/system/controller/auth/SysUserSessionController.java
... ... @@ -27,7 +27,7 @@ import java.util.Map;
27 27 import static cn.iocoder.dashboard.common.pojo.CommonResult.success;
28 28 import static cn.iocoder.dashboard.util.collection.CollectionUtils.convertList;
29 29  
30   -@Api("用户 Session API")
  30 +@Api(tags = "用户 Session")
31 31 @RestController
32 32 @RequestMapping("/system/user-session")
33 33 public class SysUserSessionController {
... ...
src/main/java/cn/iocoder/dashboard/modules/system/controller/common/SysCaptchaController.java
... ... @@ -13,7 +13,7 @@ import javax.annotation.Resource;
13 13  
14 14 import static cn.iocoder.dashboard.common.pojo.CommonResult.success;
15 15  
16   -@Api(tags = "验证码 API")
  16 +@Api(tags = "验证码")
17 17 @RestController
18 18 @RequestMapping("/system/captcha")
19 19 public class SysCaptchaController {
... ...
src/main/java/cn/iocoder/dashboard/modules/system/controller/common/SysFileController.java
... ... @@ -20,7 +20,7 @@ import java.io.IOException;
20 20  
21 21 import static cn.iocoder.dashboard.common.pojo.CommonResult.success;
22 22  
23   -@Api(tags = "文件 API")
  23 +@Api(tags = "文件存储")
24 24 @RestController
25 25 @RequestMapping("/system/file")
26 26 @Slf4j
... ...
src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/SysDeptController.java
... ... @@ -18,7 +18,7 @@ import java.util.List;
18 18  
19 19 import static cn.iocoder.dashboard.common.pojo.CommonResult.success;
20 20  
21   -@Api(tags = "部门 API")
  21 +@Api(tags = "部门")
22 22 @RestController
23 23 @RequestMapping("/system/dept")
24 24 public class SysDeptController {
... ...
src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/SysPostController.java
... ... @@ -23,7 +23,7 @@ import java.util.List;
23 23  
24 24 import static cn.iocoder.dashboard.common.pojo.CommonResult.success;
25 25  
26   -@Api(tags = "岗位 API")
  26 +@Api(tags = "岗位")
27 27 @RestController
28 28 @RequestMapping("/system/post")
29 29 public class SysPostController {
... ...
src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/SysDictDataController.java
... ... @@ -20,7 +20,7 @@ import java.util.List;
20 20  
21 21 import static cn.iocoder.dashboard.common.pojo.CommonResult.success;
22 22  
23   -@Api(tags = "字典数据 API")
  23 +@Api(tags = "字典数据")
24 24 @RestController
25 25 @RequestMapping("/system/dict-data")
26 26 public class SysDictDataController {
... ...
src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/SysDictTypeController.java
... ... @@ -20,7 +20,7 @@ import java.util.List;
20 20  
21 21 import static cn.iocoder.dashboard.common.pojo.CommonResult.success;
22 22  
23   -@Api(tags = "字典类型 API")
  23 +@Api(tags = "字典类型")
24 24 @RestController
25 25 @RequestMapping("/system/dict-type")
26 26 public class SysDictTypeController {
... ...
src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/SysLoginLogController.java
... ... @@ -22,7 +22,7 @@ import javax.servlet.http.HttpServletResponse;
22 22 import java.io.IOException;
23 23 import java.util.List;
24 24  
25   -@Api(tags = "登陆日志 API")
  25 +@Api(tags = "登陆日志")
26 26 @RestController
27 27 @RequestMapping("/system/login-log")
28 28 public class SysLoginLogController {
... ...
src/main/java/cn/iocoder/dashboard/modules/system/controller/logger/SysOperateLogController.java
... ... @@ -35,7 +35,7 @@ import java.util.Map;
35 35 import static cn.iocoder.dashboard.common.pojo.CommonResult.success;
36 36 import static cn.iocoder.dashboard.framework.logger.operatelog.core.enums.OperateTypeEnum.EXPORT;
37 37  
38   -@Api(tags = "操作日志 API")
  38 +@Api(tags = "操作日志")
39 39 @RestController
40 40 @RequestMapping("/system/operate-log")
41 41 public class SysOperateLogController {
... ...
src/main/java/cn/iocoder/dashboard/modules/system/controller/notice/SysNoticeController.java
... ... @@ -18,7 +18,7 @@ import javax.annotation.Resource;
18 18  
19 19 import static cn.iocoder.dashboard.common.pojo.CommonResult.success;
20 20  
21   -@Api(tags = "通知公告 API")
  21 +@Api(tags = "通知公告")
22 22 @RestController
23 23 @RequestMapping("/system/notice")
24 24 public class SysNoticeController {
... ...
src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/SysMenuController.java
... ... @@ -18,7 +18,7 @@ import java.util.List;
18 18  
19 19 import static cn.iocoder.dashboard.common.pojo.CommonResult.success;
20 20  
21   -@Api(tags = "菜单 API")
  21 +@Api(tags = "菜单")
22 22 @RestController
23 23 @RequestMapping("/system/menu")
24 24 public class SysMenuController {
... ...
src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/SysPermissionController.java
... ... @@ -21,7 +21,7 @@ import static cn.iocoder.dashboard.common.pojo.CommonResult.success;
21 21 *
22 22 * @author 芋道源码
23 23 */
24   -@Api(tags = "权限 API")
  24 +@Api(tags = "权限")
25 25 @RestController
26 26 @RequestMapping("/system/permission")
27 27 public class SysPermissionController {
... ...
src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/SysRoleController.java
... ... @@ -23,7 +23,7 @@ import java.util.List;
23 23  
24 24 import static cn.iocoder.dashboard.common.pojo.CommonResult.success;
25 25  
26   -@Api(tags = "角色 API")
  26 +@Api(tags = "角色")
27 27 @RestController
28 28 @RequestMapping("/system/role")
29 29 public class SysRoleController {
... ...
src/main/java/cn/iocoder/dashboard/modules/system/controller/user/SysUserController.java
... ... @@ -30,7 +30,7 @@ import java.util.*;
30 30  
31 31 import static cn.iocoder.dashboard.common.pojo.CommonResult.success;
32 32  
33   -@Api(tags = "用户 API")
  33 +@Api(tags = "用户")
34 34 @RestController
35 35 @RequestMapping("/system/user")
36 36 public class SysUserController {
... ...
src/main/java/cn/iocoder/dashboard/modules/tool/controller/codegen/ToolCodegenController.java
... ... @@ -37,7 +37,7 @@ import java.util.Set;
37 37  
38 38 import static cn.iocoder.dashboard.common.pojo.CommonResult.success;
39 39  
40   -@Api(tags = "代码生成器 API")
  40 +@Api(tags = "代码生成器")
41 41 @RestController
42 42 @RequestMapping("/tool/codegen")
43 43 @Validated
... ... @@ -49,8 +49,8 @@ public class ToolCodegenController {
49 49 @GetMapping("/db/table/list")
50 50 @ApiOperation(value = "获得数据库自带的表定义列表", notes = "会过滤掉已经导入 Codegen 的表")
51 51 @ApiImplicitParams({
52   - @ApiImplicitParam(name = "tableName", required = true, example = "yudao", dataTypeClass = String.class),
53   - @ApiImplicitParam(name = "tableComment", required = true, example = "芋道", dataTypeClass = String.class)
  52 + @ApiImplicitParam(name = "tableName", value = "表名,模糊匹配", required = true, example = "yudao", dataTypeClass = String.class),
  53 + @ApiImplicitParam(name = "tableComment", value = "描述,模糊匹配", required = true, example = "芋道", dataTypeClass = String.class)
54 54 })
55 55 @PreAuthorize("@ss.hasPermission('tool:codegen:query')")
56 56 public CommonResult<List<ToolSchemaTableRespVO>> getSchemaTableList(
... ... @@ -74,7 +74,7 @@ public class ToolCodegenController {
74 74  
75 75 @GetMapping("/detail")
76 76 @ApiOperation("获得表和字段的明细")
77   - @ApiImplicitParam(name = "tableId", required = true, example = "表编号", dataTypeClass = Long.class)
  77 + @ApiImplicitParam(name = "tableId", value = "表编号", required = true, example = "1024", dataTypeClass = Long.class)
78 78 @PreAuthorize("@ss.hasPermission('tool:codegen:query')")
79 79 public CommonResult<ToolCodegenDetailRespVO> getCodegenDetail(@RequestParam("tableId") Long tableId) {
80 80 ToolCodegenTableDO table = codegenService.getCodegenTablePage(tableId);
... ... @@ -84,7 +84,7 @@ public class ToolCodegenController {
84 84 }
85 85  
86 86 @ApiOperation("基于数据库的表结构,创建代码生成器的表和字段定义")
87   - @ApiImplicitParam(name = "tableNames", required = true, example = "sys_user", dataTypeClass = List.class)
  87 + @ApiImplicitParam(name = "tableNames", value = "表名数组", required = true, example = "sys_user", dataTypeClass = List.class)
88 88 @PostMapping("/create-list-from-db")
89 89 @PreAuthorize("@ss.hasPermission('tool:codegen:create')")
90 90 public CommonResult<List<Long>> createCodegenListFromDB(@RequestParam("tableNames") List<String> tableNames) {
... ... @@ -92,7 +92,7 @@ public class ToolCodegenController {
92 92 }
93 93  
94 94 @ApiOperation("基于 SQL 建表语句,创建代码生成器的表和字段定义")
95   - @ApiImplicitParam(name = "SQL 建表语句", required = true, example = "sql", dataTypeClass = String.class)
  95 + @ApiImplicitParam(name = "sql", value = "SQL 建表语句", required = true, example = "sql", dataTypeClass = String.class)
96 96 @PostMapping("/create-list-from-sql")
97 97 @PreAuthorize("@ss.hasPermission('tool:codegen:create')")
98 98 public CommonResult<Long> createCodegenListFromSQL(@RequestParam("sql") String sql) {
... ... @@ -109,7 +109,7 @@ public class ToolCodegenController {
109 109  
110 110 @ApiOperation("基于数据库的表结构,同步数据库的表和字段定义")
111 111 @PutMapping("/sync-from-db")
112   - @ApiImplicitParam(name = "tableId", required = true, example = "表编号", dataTypeClass = Long.class)
  112 + @ApiImplicitParam(name = "tableId", value = "表编号", required = true, example = "1024", dataTypeClass = Long.class)
113 113 @PreAuthorize("@ss.hasPermission('tool:codegen:update')")
114 114 public CommonResult<Boolean> syncCodegenFromDB(@RequestParam("tableId") Long tableId) {
115 115 codegenService.syncCodegenFromDB(tableId);
... ... @@ -119,8 +119,8 @@ public class ToolCodegenController {
119 119 @ApiOperation("基于 SQL 建表语句,同步数据库的表和字段定义")
120 120 @PutMapping("/sync-from-sql")
121 121 @ApiImplicitParams({
122   - @ApiImplicitParam(name = "tableId", required = true, example = "表编号", dataTypeClass = Long.class),
123   - @ApiImplicitParam(name = "SQL 建表语句", required = true, example = "sql", dataTypeClass = String.class)
  122 + @ApiImplicitParam(name = "tableId", value = "表编号", required = true, example = "1024", dataTypeClass = Long.class),
  123 + @ApiImplicitParam(name = "sql", value = "SQL 建表语句", required = true, example = "sql", dataTypeClass = String.class)
124 124 })
125 125 @PreAuthorize("@ss.hasPermission('tool:codegen:update')")
126 126 public CommonResult<Boolean> syncCodegenFromSQL(@RequestParam("tableId") Long tableId,
... ... @@ -131,7 +131,7 @@ public class ToolCodegenController {
131 131  
132 132 @ApiOperation("删除数据库的表和字段定义")
133 133 @DeleteMapping("/delete")
134   - @ApiImplicitParam(name = "tableId", required = true, example = "表编号", dataTypeClass = Long.class)
  134 + @ApiImplicitParam(name = "tableId", value = "表编号", required = true, example = "1024", dataTypeClass = Long.class)
135 135 @PreAuthorize("@ss.hasPermission('tool:codegen:delete')")
136 136 public CommonResult<Boolean> deleteCodegen(@RequestParam("tableId") Long tableId) {
137 137 codegenService.deleteCodegen(tableId);
... ... @@ -140,7 +140,7 @@ public class ToolCodegenController {
140 140  
141 141 @ApiOperation("预览生成代码")
142 142 @GetMapping("/preview")
143   - @ApiImplicitParam(name = "tableId", required = true, example = "表编号", dataTypeClass = Long.class)
  143 + @ApiImplicitParam(name = "tableId", value = "表编号", required = true, example = "1024", dataTypeClass = Long.class)
144 144 @PreAuthorize("@ss.hasPermission('tool:codegen:preview')")
145 145 public CommonResult<List<ToolCodegenPreviewRespVO>> previewCodegen(@RequestParam("tableId") Long tableId) {
146 146 Map<String, String> codes = codegenService.generationCodes(tableId);
... ... @@ -149,7 +149,7 @@ public class ToolCodegenController {
149 149  
150 150 @ApiOperation("下载生成代码")
151 151 @GetMapping("/download")
152   - @ApiImplicitParam(name = "tableId", required = true, example = "表编号", dataTypeClass = Long.class)
  152 + @ApiImplicitParam(name = "tableId", value = "表编号", required = true, example = "1024", dataTypeClass = Long.class)
153 153 @PreAuthorize("@ss.hasPermission('tool:codegen:download')")
154 154 public void downloadCodegen(@RequestParam("tableId") Long tableId,
155 155 HttpServletResponse response) throws IOException {
... ... @@ -164,18 +164,4 @@ public class ToolCodegenController {
164 164 ServletUtils.writeAttachment(response, "codegen.zip", outputStream.toByteArray());
165 165 }
166 166  
167   -// /**
168   -// * 查询数据表字段列表
169   -// */
170   -// @PreAuthorize("@ss.hasPermi('tool:gen:list')")
171   -// @GetMapping(value = "/column/{talbleId}")
172   -// public TableDataInfo columnList(Long tableId) {
173   -// TableDataInfo dataInfo = new TableDataInfo();
174   -// List<GenTableColumn> list = genTableColumnService.selectGenTableColumnListByTableId(tableId);
175   -// dataInfo.setRows(list);
176   -// dataInfo.setTotal(list.size());
177   -// return dataInfo;
178   -// }
179   -//
180   -
181 167 }
... ...
src/main/resources/application-dev.yaml
... ... @@ -75,7 +75,7 @@ spring:
75 75 admin:
76 76 # Spring Boot Admin Client 客户端的相关配置
77 77 client:
78   - url: http://127.0.0.1:8080/${spring.boot.admin.context-path} # 设置 Spring Boot Admin Server 地址
  78 + url: http://127.0.0.1:${server.port}/${spring.boot.admin.context-path} # 设置 Spring Boot Admin Server 地址
79 79 # Spring Boot Admin Server 服务端的相关配置
80 80 context-path: /admin # 配置 Spring
81 81  
... ...
src/main/resources/application-local.yaml
... ... @@ -75,7 +75,7 @@ spring:
75 75 admin:
76 76 # Spring Boot Admin Client 客户端的相关配置
77 77 client:
78   - url: http://127.0.0.1:8080/${spring.boot.admin.context-path} # 设置 Spring Boot Admin Server 地址
  78 + url: http://127.0.0.1:${server.port}/${spring.boot.admin.context-path} # 设置 Spring Boot Admin Server 地址
79 79 # Spring Boot Admin Server 服务端的相关配置
80 80 context-path: /admin # 配置 Spring
81 81  
... ...