1. 自定义管理页面
1.1. SDK JAR包需要更新至1.2.5.SNAPSHOT
参数名 |
类型 |
说明 |
备注 |
id |
String |
主键ID |
无 |
code |
String |
菜单编码 |
无 |
name |
String |
菜单名称 |
无 |
path |
String |
菜单跳转路径 |
无 |
idx |
int |
菜单顺序 |
按值从小到大顺序排列 |
is_deleted |
boolean |
是否删除 |
无 |
is_enabled |
boolean |
是否有效 |
无 |
1.3. 开发步骤
1.3.1. 数据库配置菜单
数据库增加需要的菜单项,同时可以隐藏系统默认的配置项,隐藏只需要is_enabled配置为false即可
增加的配置项需要is_enabled为true,is_deleted为false
举例:
INSERT INTO mid_menu (code, name, path, idx, is_deleted, is_enabled, created_date, created_by, last_updated_date, last_updated_by)
VALUES ('test', '测试数据', '/test', '1', false, true, now(), '1', now(), '1');
1.3.2. 增加controller
增加数据库配置跳转对应的页面
举例 TestController:
package com.helioscloud.middleware.web;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
public class TestController {
@RequestMapping("/test")
public String getPage(ModelMap modelMap) {
return "test";
}
}
1.3.3. 增加页面
增加的页面需要放在resources/templates
html需要的样式文件请自行增加
举例 test.html:
<!DOCTYPE html>
<html xmlns:th="www.thymeleaf.org">
<head>
<title>Error page</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<header th:insert="layout :: header(~{ :: .breadcrumb})">
<ol class="breadcrumb container">
<li><a href="#">首页</a></li>
<li><a href="#" th:href="@{/task}">测试页面</a></li>
</ol>
</header>
<h1 style="text-align:center">这是一个测试页面</h1>
</body>
</html>
1.3.4. 启动项目
访问项目路径,登录,即可看到配置的菜单项
1.3.5. SDK可配置菜单
路径 |
SDK最低版本 |
说明 |
备注 |
task |
1.2.9 |
定时任务管理 |
配置时可以将path设置为task即可,以下类同 |
configuration |
1.2.9 |
配置管理 |
无 |
email |
1.2.9 |
邮件发送历史 |
无 |
user |
1.2.9 |
用户管理 |
无 |
mapping |
1.2.9 |
字典表 |
按值从小到大顺序排列 |
reqhis |
1.2.9 |
请求历史 |
无 |
menu |
1.2.9 |
菜单管理 |
无 |
requestFail |
1.2.9 |
失败列表 |
无 |
allmapping |
1.2.9 |
mapping结尾表管理 |
无 |
monitoredException |
1.2.11 |
项目异常管理 |
|
aesutil |
1.2.9 |
加解密工具 |
无 |
dataOperation |
1.2.10 |
操作日志 |
无 |
taskCompensate |
1.2.10 |
任务补偿 |
无 |
taskHistory |
1.2.11 |
任务请求历史 |
无 |