更新数据库,增加apifox实体json
This commit is contained in:
@@ -58,10 +58,11 @@ CREATE TABLE `tb_sys_dept_role` (
|
|||||||
INSERT INTO `tb_sys_dept_role` (id, dept_id, role_id) VALUES ('1', 'default_department', 'admin');
|
INSERT INTO `tb_sys_dept_role` (id, dept_id, role_id) VALUES ('1', 'default_department', 'admin');
|
||||||
|
|
||||||
-- 用户-角色关联
|
-- 用户-角色关联
|
||||||
DROP TABLE IF EXISTS `tb_sys_user_role`;
|
DROP TABLE IF EXISTS `tb_sys_user_dept_role`;
|
||||||
CREATE TABLE `tb_sys_user_role` (
|
CREATE TABLE `tb_sys_user_dept_role` (
|
||||||
`id` VARCHAR(50) NOT NULL COMMENT '用户角色ID',
|
`id` VARCHAR(50) NOT NULL COMMENT '用户角色ID',
|
||||||
`user_id` VARCHAR(50) NOT NULL COMMENT '用户ID',
|
`user_id` VARCHAR(50) NOT NULL COMMENT '用户ID',
|
||||||
|
`dept_id` VARCHAR(50) NOT NULL COMMENT '部门ID',
|
||||||
`role_id` VARCHAR(50) NOT NULL COMMENT '角色ID',
|
`role_id` VARCHAR(50) NOT NULL COMMENT '角色ID',
|
||||||
`creator` VARCHAR(50) DEFAULT NULL COMMENT '创建者',
|
`creator` VARCHAR(50) DEFAULT NULL COMMENT '创建者',
|
||||||
`updater` VARCHAR(50) DEFAULT NULL COMMENT '更新者',
|
`updater` VARCHAR(50) DEFAULT NULL COMMENT '更新者',
|
||||||
@@ -70,10 +71,10 @@ CREATE TABLE `tb_sys_user_role` (
|
|||||||
`delete_time` TIMESTAMP NULL DEFAULT NULL COMMENT '删除时间',
|
`delete_time` TIMESTAMP NULL DEFAULT NULL COMMENT '删除时间',
|
||||||
`deleted` TINYINT(1) NOT NULL DEFAULT 0 COMMENT '是否删除',
|
`deleted` TINYINT(1) NOT NULL DEFAULT 0 COMMENT '是否删除',
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
UNIQUE KEY `uk_user_role` (`user_id`, `role_id`)
|
UNIQUE KEY `uk_user_dept_role` (`user_id`, `dept_id`, `role_id`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
|
||||||
|
|
||||||
INSERT INTO `tb_sys_user_role` (id, user_id, role_id) VALUES ('1', '1', 'admin');
|
INSERT INTO `tb_sys_user_dept_role` (id, user_id, dept_id, role_id) VALUES ('1', '1', 'default_department', 'admin');
|
||||||
|
|
||||||
-- 权限表
|
-- 权限表
|
||||||
DROP TABLE IF EXISTS `tb_sys_permission`;
|
DROP TABLE IF EXISTS `tb_sys_permission`;
|
||||||
@@ -119,7 +120,12 @@ INSERT INTO `tb_sys_role_permission` (id, role_id, permission_id) VALUES
|
|||||||
('1', 'admin', 'perm_user_manage'),
|
('1', 'admin', 'perm_user_manage'),
|
||||||
('2', 'admin', 'perm_role_manage'),
|
('2', 'admin', 'perm_role_manage'),
|
||||||
('3', 'admin', 'perm_dept_manage'),
|
('3', 'admin', 'perm_dept_manage'),
|
||||||
('4', 'admin', 'perm_permission_manage');
|
('4', 'admin', 'perm_permission_manage'),
|
||||||
|
('5', 'admin', 'perm_dashboard'),
|
||||||
|
('6', 'admin', 'perm_user_manage'),
|
||||||
|
('7', 'admin', 'perm_role_manage'),
|
||||||
|
('8', 'admin', 'perm_dept_manage'),
|
||||||
|
('9', 'admin', 'perm_permission_manage');
|
||||||
|
|
||||||
-- 菜单表
|
-- 菜单表
|
||||||
DROP TABLE IF EXISTS `tb_sys_menu`;
|
DROP TABLE IF EXISTS `tb_sys_menu`;
|
||||||
@@ -149,7 +155,12 @@ INSERT INTO `tb_sys_menu` (id,menu_id, name, parent_id, url, icon, order_num, ty
|
|||||||
('2','menu_user_mgmt', '用户管理', NULL, '/user-management', 'user', 2, 1),
|
('2','menu_user_mgmt', '用户管理', NULL, '/user-management', 'user', 2, 1),
|
||||||
('3','menu_role_mgmt', '角色管理', NULL, '/role-management', 'team', 3, 1),
|
('3','menu_role_mgmt', '角色管理', NULL, '/role-management', 'team', 3, 1),
|
||||||
('4','menu_dept_mgmt', '部门管理', NULL, '/dept-management', 'apartment', 4, 1),
|
('4','menu_dept_mgmt', '部门管理', NULL, '/dept-management', 'apartment', 4, 1),
|
||||||
('5','menu_permission_mgmt', '权限管理', NULL, '/permission-management', 'safety-certificate', 5, 1);
|
('5','menu_permission_mgmt', '权限管理', NULL, '/permission-management', 'safety-certificate', 5, 1),
|
||||||
|
('6','menu_dashboard', '仪表盘', NULL, '/dashboard', 'dashboard', 6, 1),
|
||||||
|
('7','menu_user_mgmt', '用户管理', NULL, '/user-management', 'user', 7, 1),
|
||||||
|
('8','menu_role_mgmt', '角色管理', NULL, '/role-management', 'team', 8, 1),
|
||||||
|
('9','menu_dept_mgmt', '部门管理', NULL, '/dept-management', 'apartment', 9, 1),
|
||||||
|
('10','menu_permission_mgmt', '权限管理', NULL, '/permission-management', 'safety-certificate', 10, 1);
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `tb_sys_menu_permission`;
|
DROP TABLE IF EXISTS `tb_sys_menu_permission`;
|
||||||
CREATE TABLE `tb_sys_menu_permission` (
|
CREATE TABLE `tb_sys_menu_permission` (
|
||||||
@@ -167,8 +178,8 @@ CREATE TABLE `tb_sys_menu_permission` (
|
|||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
|
||||||
-- Insert default role-menu associations for admin role
|
-- Insert default role-menu associations for admin role
|
||||||
INSERT INTO `tb_sys_menu_permission` (id, permission_id, menu_id) VALUES
|
INSERT INTO `tb_sys_menu_permission` (id, permission_id, menu_id) VALUES
|
||||||
('1', 'admin', 'menu_dashboard'),
|
('1', 'perm_dashboard', 'menu_dashboard'),
|
||||||
('2', 'admin', 'menu_user_mgmt'),
|
('2', 'perm_user_manage', 'menu_user_mgmt'),
|
||||||
('3', 'admin', 'menu_role_mgmt'),
|
('3', 'perm_role_manage', 'menu_role_mgmt'),
|
||||||
('4', 'admin', 'menu_dept_mgmt'),
|
('4', 'perm_dept_manage', 'menu_dept_mgmt'),
|
||||||
('5', 'admin', 'menu_permission_mgmt');
|
('5', 'perm_permission_manage', 'menu_permission_mgmt');
|
||||||
@@ -21,7 +21,7 @@ CREATE TABLE `tb_sys_user` (
|
|||||||
|
|
||||||
-- 推荐:把默认 admin 密码替换为已哈希的值
|
-- 推荐:把默认 admin 密码替换为已哈希的值
|
||||||
INSERT INTO `tb_sys_user` (id, username, password, email) VALUES
|
INSERT INTO `tb_sys_user` (id, username, password, email) VALUES
|
||||||
('1', 'admin', '123456', '3223905473@qq.com');
|
('1', 'admin', '$2a$10$/Bo2SXboVUpYfR6EA.y8puYQaMGBcuNYFY/EkQRY3w27IH56EuEcS', '3223905473@qq.com');
|
||||||
|
|
||||||
-- 用户信息表
|
-- 用户信息表
|
||||||
DROP TABLE IF EXISTS `tb_sys_user_info`;
|
DROP TABLE IF EXISTS `tb_sys_user_info`;
|
||||||
|
|||||||
64
schoolNewsServ/.doc/apifox/domain/auth/LoginDomain.json
Normal file
64
schoolNewsServ/.doc/apifox/domain/auth/LoginDomain.json
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
{
|
||||||
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||||
|
"title": "LoginDomain",
|
||||||
|
"description": "登录域对象",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"user": {
|
||||||
|
"description": "用户信息",
|
||||||
|
"example": null
|
||||||
|
},
|
||||||
|
"userInfo": {
|
||||||
|
"description": "用户详细信息",
|
||||||
|
"example": null
|
||||||
|
},
|
||||||
|
"roles": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "用户角色列表",
|
||||||
|
"items": {},
|
||||||
|
"example": []
|
||||||
|
},
|
||||||
|
"permissions": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "用户权限列表",
|
||||||
|
"items": {},
|
||||||
|
"example": []
|
||||||
|
},
|
||||||
|
"menus": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "用户菜单列表",
|
||||||
|
"items": {},
|
||||||
|
"example": []
|
||||||
|
},
|
||||||
|
"token": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "JWT令牌",
|
||||||
|
"example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
|
||||||
|
},
|
||||||
|
"tokenExpireTime": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "date-time",
|
||||||
|
"description": "令牌过期时间",
|
||||||
|
"example": "2025-10-06T16:00:00Z"
|
||||||
|
},
|
||||||
|
"loginTime": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "date-time",
|
||||||
|
"description": "登录时间",
|
||||||
|
"example": "2025-10-05T16:00:00Z"
|
||||||
|
},
|
||||||
|
"ipAddress": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "ipv4",
|
||||||
|
"description": "登录IP地址",
|
||||||
|
"example": "192.168.1.100"
|
||||||
|
},
|
||||||
|
"loginType": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "登录类型",
|
||||||
|
"enum": ["email", "username", "phone", "wechat"],
|
||||||
|
"example": "username"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["token", "loginTime", "loginType"]
|
||||||
|
}
|
||||||
56
schoolNewsServ/.doc/apifox/domain/auth/LoginParam.json
Normal file
56
schoolNewsServ/.doc/apifox/domain/auth/LoginParam.json
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
{
|
||||||
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||||
|
"title": "LoginParam",
|
||||||
|
"description": "登录参数",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"email": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "email",
|
||||||
|
"description": "邮箱",
|
||||||
|
"example": "user@example.com"
|
||||||
|
},
|
||||||
|
"username": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "用户名",
|
||||||
|
"minLength": 1,
|
||||||
|
"maxLength": 50,
|
||||||
|
"example": "admin"
|
||||||
|
},
|
||||||
|
"phone": {
|
||||||
|
"type": "string",
|
||||||
|
"pattern": "^1[3-9]\\d{9}$",
|
||||||
|
"description": "手机号",
|
||||||
|
"example": "13800138000"
|
||||||
|
},
|
||||||
|
"wechatID": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "微信ID",
|
||||||
|
"example": "wx_123456789"
|
||||||
|
},
|
||||||
|
"password": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "密码",
|
||||||
|
"minLength": 6,
|
||||||
|
"maxLength": 20,
|
||||||
|
"example": "123456"
|
||||||
|
},
|
||||||
|
"captcha": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "验证码",
|
||||||
|
"example": "1234"
|
||||||
|
},
|
||||||
|
"loginType": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "登录类型",
|
||||||
|
"enum": ["email", "username", "phone", "wechat"],
|
||||||
|
"example": "username"
|
||||||
|
},
|
||||||
|
"rememberMe": {
|
||||||
|
"type": "boolean",
|
||||||
|
"description": "记住我",
|
||||||
|
"example": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["password", "loginType"]
|
||||||
|
}
|
||||||
38
schoolNewsServ/.doc/apifox/domain/dto/BaseDTO.json
Normal file
38
schoolNewsServ/.doc/apifox/domain/dto/BaseDTO.json
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||||
|
"title": "BaseDTO",
|
||||||
|
"description": "基础数据传输对象",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "主键ID",
|
||||||
|
"example": "1234567890123456789"
|
||||||
|
},
|
||||||
|
"createTime": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "date-time",
|
||||||
|
"description": "创建时间",
|
||||||
|
"example": "2025-10-05T16:00:00Z"
|
||||||
|
},
|
||||||
|
"updateTime": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "date-time",
|
||||||
|
"description": "更新时间",
|
||||||
|
"example": "2025-10-05T16:30:00Z"
|
||||||
|
},
|
||||||
|
"deleteTime": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "date-time",
|
||||||
|
"description": "删除时间",
|
||||||
|
"example": null
|
||||||
|
},
|
||||||
|
"deleted": {
|
||||||
|
"type": "boolean",
|
||||||
|
"description": "是否删除",
|
||||||
|
"default": false,
|
||||||
|
"example": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["id", "createTime", "updateTime", "deleted"]
|
||||||
|
}
|
||||||
50
schoolNewsServ/.doc/apifox/domain/dto/TbSysDept.json
Normal file
50
schoolNewsServ/.doc/apifox/domain/dto/TbSysDept.json
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
{
|
||||||
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||||
|
"title": "TbSysDept",
|
||||||
|
"description": "系统部门信息",
|
||||||
|
"type": "object",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "BaseDTO.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"deptID": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "部门ID",
|
||||||
|
"example": "1234567890123456789"
|
||||||
|
},
|
||||||
|
"parentID": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "父部门ID",
|
||||||
|
"example": "1234567890123456789"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "部门名称",
|
||||||
|
"minLength": 1,
|
||||||
|
"maxLength": 50,
|
||||||
|
"example": "技术部"
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "部门描述",
|
||||||
|
"maxLength": 200,
|
||||||
|
"example": "技术开发部门"
|
||||||
|
},
|
||||||
|
"creator": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "创建人",
|
||||||
|
"example": "admin"
|
||||||
|
},
|
||||||
|
"updater": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "更新人",
|
||||||
|
"example": "admin"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["deptID", "name"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
37
schoolNewsServ/.doc/apifox/domain/dto/TbSysDeptRole.json
Normal file
37
schoolNewsServ/.doc/apifox/domain/dto/TbSysDeptRole.json
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
{
|
||||||
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||||
|
"title": "TbSysDeptRole",
|
||||||
|
"description": "部门角色关联信息",
|
||||||
|
"type": "object",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "BaseDTO.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"deptID": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "部门ID",
|
||||||
|
"example": "1234567890123456789"
|
||||||
|
},
|
||||||
|
"roleID": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "角色ID",
|
||||||
|
"example": "1234567890123456789"
|
||||||
|
},
|
||||||
|
"creator": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "创建人",
|
||||||
|
"example": "admin"
|
||||||
|
},
|
||||||
|
"updater": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "更新人",
|
||||||
|
"example": "admin"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["deptID", "roleID"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
76
schoolNewsServ/.doc/apifox/domain/dto/TbSysLoginLog.json
Normal file
76
schoolNewsServ/.doc/apifox/domain/dto/TbSysLoginLog.json
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
{
|
||||||
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||||
|
"title": "TbSysLoginLog",
|
||||||
|
"description": "系统登录日志信息",
|
||||||
|
"type": "object",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "BaseDTO.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"userID": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "用户ID",
|
||||||
|
"example": "1234567890123456789"
|
||||||
|
},
|
||||||
|
"username": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "用户名",
|
||||||
|
"example": "admin"
|
||||||
|
},
|
||||||
|
"ipAddress": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "ipv4",
|
||||||
|
"description": "登录IP地址",
|
||||||
|
"example": "192.168.1.100"
|
||||||
|
},
|
||||||
|
"ipSource": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "IP来源",
|
||||||
|
"example": "北京市"
|
||||||
|
},
|
||||||
|
"browser": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "浏览器类型",
|
||||||
|
"example": "Chrome"
|
||||||
|
},
|
||||||
|
"os": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "操作系统",
|
||||||
|
"example": "Windows 10"
|
||||||
|
},
|
||||||
|
"password": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "登录密码",
|
||||||
|
"example": "******"
|
||||||
|
},
|
||||||
|
"loginTime": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "date-time",
|
||||||
|
"description": "登录时间",
|
||||||
|
"example": "2025-10-05T16:00:00Z"
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "登录状态(0-失败,1-成功)",
|
||||||
|
"enum": [0, 1],
|
||||||
|
"example": 1
|
||||||
|
},
|
||||||
|
"errorCount": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "错误次数",
|
||||||
|
"minimum": 0,
|
||||||
|
"example": 0
|
||||||
|
},
|
||||||
|
"message": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "登录消息",
|
||||||
|
"example": "登录成功"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["userID", "username", "ipAddress", "loginTime", "status"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
72
schoolNewsServ/.doc/apifox/domain/dto/TbSysMenu.json
Normal file
72
schoolNewsServ/.doc/apifox/domain/dto/TbSysMenu.json
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
{
|
||||||
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||||
|
"title": "TbSysMenu",
|
||||||
|
"description": "系统菜单信息",
|
||||||
|
"type": "object",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "BaseDTO.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"menuID": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "菜单ID",
|
||||||
|
"example": "1234567890123456789"
|
||||||
|
},
|
||||||
|
"parentID": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "父菜单ID",
|
||||||
|
"example": "1234567890123456789"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "菜单名称",
|
||||||
|
"minLength": 1,
|
||||||
|
"maxLength": 50,
|
||||||
|
"example": "用户管理"
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "菜单描述",
|
||||||
|
"maxLength": 200,
|
||||||
|
"example": "用户管理菜单"
|
||||||
|
},
|
||||||
|
"url": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "菜单URL",
|
||||||
|
"example": "/user/manage"
|
||||||
|
},
|
||||||
|
"icon": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "菜单图标",
|
||||||
|
"example": "user"
|
||||||
|
},
|
||||||
|
"orderNum": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "菜单顺序",
|
||||||
|
"minimum": 0,
|
||||||
|
"example": 1
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "菜单类型(0-目录,1-菜单,2-按钮)",
|
||||||
|
"enum": [0, 1, 2],
|
||||||
|
"example": 1
|
||||||
|
},
|
||||||
|
"creator": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "创建人",
|
||||||
|
"example": "admin"
|
||||||
|
},
|
||||||
|
"updater": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "更新人",
|
||||||
|
"example": "admin"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["menuID", "name", "type"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
{
|
||||||
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||||
|
"title": "TbSysMenuPermission",
|
||||||
|
"description": "菜单权限关联信息",
|
||||||
|
"type": "object",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "BaseDTO.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"menuID": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "菜单ID",
|
||||||
|
"example": "1234567890123456789"
|
||||||
|
},
|
||||||
|
"permissionID": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "权限ID",
|
||||||
|
"example": "1234567890123456789"
|
||||||
|
},
|
||||||
|
"creator": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "创建人",
|
||||||
|
"example": "admin"
|
||||||
|
},
|
||||||
|
"updater": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "更新人",
|
||||||
|
"example": "admin"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["menuID", "permissionID"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
52
schoolNewsServ/.doc/apifox/domain/dto/TbSysPermission.json
Normal file
52
schoolNewsServ/.doc/apifox/domain/dto/TbSysPermission.json
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
{
|
||||||
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||||
|
"title": "TbSysPermission",
|
||||||
|
"description": "系统权限信息",
|
||||||
|
"type": "object",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "BaseDTO.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"permissionID": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "权限ID",
|
||||||
|
"example": "1234567890123456789"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "权限名称",
|
||||||
|
"minLength": 1,
|
||||||
|
"maxLength": 50,
|
||||||
|
"example": "用户管理"
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "权限描述",
|
||||||
|
"maxLength": 200,
|
||||||
|
"example": "用户管理权限"
|
||||||
|
},
|
||||||
|
"code": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "权限编码",
|
||||||
|
"minLength": 1,
|
||||||
|
"maxLength": 50,
|
||||||
|
"example": "user:manage"
|
||||||
|
},
|
||||||
|
"creator": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "创建人",
|
||||||
|
"example": "admin"
|
||||||
|
},
|
||||||
|
"updater": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "更新人",
|
||||||
|
"example": "admin"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["permissionID", "name", "code"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
45
schoolNewsServ/.doc/apifox/domain/dto/TbSysRole.json
Normal file
45
schoolNewsServ/.doc/apifox/domain/dto/TbSysRole.json
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
{
|
||||||
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||||
|
"title": "TbSysRole",
|
||||||
|
"description": "系统角色信息",
|
||||||
|
"type": "object",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "BaseDTO.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"roleID": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "角色ID",
|
||||||
|
"example": "1234567890123456789"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "角色名称",
|
||||||
|
"minLength": 1,
|
||||||
|
"maxLength": 50,
|
||||||
|
"example": "管理员"
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "角色描述",
|
||||||
|
"maxLength": 200,
|
||||||
|
"example": "系统管理员角色"
|
||||||
|
},
|
||||||
|
"creator": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "创建人",
|
||||||
|
"example": "admin"
|
||||||
|
},
|
||||||
|
"updater": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "更新人",
|
||||||
|
"example": "admin"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["roleID", "name"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
{
|
||||||
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||||
|
"title": "TbSysRolePermission",
|
||||||
|
"description": "角色权限关联信息",
|
||||||
|
"type": "object",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "BaseDTO.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"roleID": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "角色ID",
|
||||||
|
"example": "1234567890123456789"
|
||||||
|
},
|
||||||
|
"permissionID": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "权限ID",
|
||||||
|
"example": "1234567890123456789"
|
||||||
|
},
|
||||||
|
"creator": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "创建人",
|
||||||
|
"example": "admin"
|
||||||
|
},
|
||||||
|
"updater": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "更新人",
|
||||||
|
"example": "admin"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["roleID", "permissionID"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
54
schoolNewsServ/.doc/apifox/domain/dto/TbSysUser.json
Normal file
54
schoolNewsServ/.doc/apifox/domain/dto/TbSysUser.json
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
{
|
||||||
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||||
|
"title": "TbSysUser",
|
||||||
|
"description": "系统用户信息",
|
||||||
|
"type": "object",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "BaseDTO.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"username": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "用户名",
|
||||||
|
"minLength": 1,
|
||||||
|
"maxLength": 50,
|
||||||
|
"example": "admin"
|
||||||
|
},
|
||||||
|
"password": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "密码",
|
||||||
|
"minLength": 6,
|
||||||
|
"maxLength": 20,
|
||||||
|
"example": "123456"
|
||||||
|
},
|
||||||
|
"email": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "email",
|
||||||
|
"description": "邮箱",
|
||||||
|
"example": "admin@example.com"
|
||||||
|
},
|
||||||
|
"phone": {
|
||||||
|
"type": "string",
|
||||||
|
"pattern": "^1[3-9]\\d{9}$",
|
||||||
|
"description": "手机号",
|
||||||
|
"example": "13800138000"
|
||||||
|
},
|
||||||
|
"wechatID": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "微信号",
|
||||||
|
"example": "wx_123456789"
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "用户状态",
|
||||||
|
"enum": [0, 1],
|
||||||
|
"example": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["username", "password", "email", "phone", "status"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
63
schoolNewsServ/.doc/apifox/domain/dto/TbSysUserInfo.json
Normal file
63
schoolNewsServ/.doc/apifox/domain/dto/TbSysUserInfo.json
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
{
|
||||||
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||||
|
"title": "TbSysUserInfo",
|
||||||
|
"description": "用户详细信息",
|
||||||
|
"type": "object",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "BaseDTO.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"userID": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "用户ID",
|
||||||
|
"example": "1234567890123456789"
|
||||||
|
},
|
||||||
|
"avatar": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "头像",
|
||||||
|
"example": "https://example.com/avatar.jpg"
|
||||||
|
},
|
||||||
|
"gender": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "性别(0-未知,1-女,2-男)",
|
||||||
|
"enum": [0, 1, 2],
|
||||||
|
"example": 1
|
||||||
|
},
|
||||||
|
"familyName": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "姓",
|
||||||
|
"maxLength": 50,
|
||||||
|
"example": "张"
|
||||||
|
},
|
||||||
|
"givenName": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "名",
|
||||||
|
"maxLength": 50,
|
||||||
|
"example": "三"
|
||||||
|
},
|
||||||
|
"fullName": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "全名",
|
||||||
|
"maxLength": 100,
|
||||||
|
"example": "张三"
|
||||||
|
},
|
||||||
|
"idCard": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "身份证号",
|
||||||
|
"pattern": "^[1-9]\\d{5}(18|19|20)\\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]$",
|
||||||
|
"example": "110101199001011234"
|
||||||
|
},
|
||||||
|
"address": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "地址",
|
||||||
|
"maxLength": 200,
|
||||||
|
"example": "北京市朝阳区"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["userID"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
37
schoolNewsServ/.doc/apifox/domain/dto/TbSysUserRole.json
Normal file
37
schoolNewsServ/.doc/apifox/domain/dto/TbSysUserRole.json
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
{
|
||||||
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||||
|
"title": "TbSysUserRole",
|
||||||
|
"description": "用户角色关联信息",
|
||||||
|
"type": "object",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "BaseDTO.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"userID": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "用户ID",
|
||||||
|
"example": "1234567890123456789"
|
||||||
|
},
|
||||||
|
"roleID": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "角色ID",
|
||||||
|
"example": "1234567890123456789"
|
||||||
|
},
|
||||||
|
"creator": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "创建人",
|
||||||
|
"example": "admin"
|
||||||
|
},
|
||||||
|
"updater": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "更新人",
|
||||||
|
"example": "admin"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["userID", "roleID"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
19
schoolNewsServ/.doc/apifox/domain/page/PageDomain.json
Normal file
19
schoolNewsServ/.doc/apifox/domain/page/PageDomain.json
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||||
|
"title": "PageDomain",
|
||||||
|
"description": "分页数据实体类",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"pageParam": {
|
||||||
|
"$ref": "PageParam.json",
|
||||||
|
"description": "分页参数"
|
||||||
|
},
|
||||||
|
"dataList": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "数据列表",
|
||||||
|
"items": {},
|
||||||
|
"example": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["pageParam", "dataList"]
|
||||||
|
}
|
||||||
36
schoolNewsServ/.doc/apifox/domain/page/PageParam.json
Normal file
36
schoolNewsServ/.doc/apifox/domain/page/PageParam.json
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
{
|
||||||
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||||
|
"title": "PageParam",
|
||||||
|
"description": "分页参数",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"pageNumber": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "当前页码",
|
||||||
|
"minimum": 1,
|
||||||
|
"default": 1,
|
||||||
|
"example": 1
|
||||||
|
},
|
||||||
|
"pageSize": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "每页显示数量",
|
||||||
|
"minimum": 1,
|
||||||
|
"maximum": 1000,
|
||||||
|
"default": 10,
|
||||||
|
"example": 10
|
||||||
|
},
|
||||||
|
"totalPages": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "总页数",
|
||||||
|
"minimum": 0,
|
||||||
|
"example": 5
|
||||||
|
},
|
||||||
|
"totalElements": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "总记录数",
|
||||||
|
"minimum": 0,
|
||||||
|
"example": 50
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["pageNumber", "pageSize", "totalPages", "totalElements"]
|
||||||
|
}
|
||||||
99
schoolNewsServ/.doc/apifox/domain/response/ResultDomain.json
Normal file
99
schoolNewsServ/.doc/apifox/domain/response/ResultDomain.json
Normal file
@@ -0,0 +1,99 @@
|
|||||||
|
{
|
||||||
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||||
|
"title": "ResultDomain",
|
||||||
|
"description": "统一返回结果实体类",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"code": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "状态码",
|
||||||
|
"example": 200
|
||||||
|
},
|
||||||
|
"message": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "返回消息",
|
||||||
|
"example": "操作成功"
|
||||||
|
},
|
||||||
|
"success": {
|
||||||
|
"type": "boolean",
|
||||||
|
"description": "操作是否成功",
|
||||||
|
"example": true
|
||||||
|
},
|
||||||
|
"login": {
|
||||||
|
"type": "boolean",
|
||||||
|
"description": "是否登录",
|
||||||
|
"example": true
|
||||||
|
},
|
||||||
|
"auth": {
|
||||||
|
"type": "boolean",
|
||||||
|
"description": "是否有权限",
|
||||||
|
"example": true
|
||||||
|
},
|
||||||
|
"data": {
|
||||||
|
"description": "返回数据",
|
||||||
|
"example": null
|
||||||
|
},
|
||||||
|
"dataList": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "返回数据列表",
|
||||||
|
"items": {},
|
||||||
|
"example": []
|
||||||
|
},
|
||||||
|
"pageParam": {
|
||||||
|
"$ref": "#/definitions/PageParam",
|
||||||
|
"description": "分页参数"
|
||||||
|
},
|
||||||
|
"pageDomain": {
|
||||||
|
"$ref": "#/definitions/PageDomain",
|
||||||
|
"description": "分页信息"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["code", "message", "success", "login", "auth"],
|
||||||
|
"definitions": {
|
||||||
|
"PageParam": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"pageNumber": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "当前页码",
|
||||||
|
"minimum": 1,
|
||||||
|
"example": 1
|
||||||
|
},
|
||||||
|
"pageSize": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "每页显示数量",
|
||||||
|
"minimum": 1,
|
||||||
|
"example": 10
|
||||||
|
},
|
||||||
|
"totalPages": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "总页数",
|
||||||
|
"minimum": 0,
|
||||||
|
"example": 5
|
||||||
|
},
|
||||||
|
"totalElements": {
|
||||||
|
"type": "integer",
|
||||||
|
"description": "总记录数",
|
||||||
|
"minimum": 0,
|
||||||
|
"example": 50
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["pageNumber", "pageSize", "totalPages", "totalElements"]
|
||||||
|
},
|
||||||
|
"PageDomain": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"pageParam": {
|
||||||
|
"$ref": "#/definitions/PageParam",
|
||||||
|
"description": "分页参数"
|
||||||
|
},
|
||||||
|
"dataList": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "数据列表",
|
||||||
|
"items": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["pageParam", "dataList"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,12 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!--
|
<!--
|
||||||
通用Log4j2配置模板
|
校园新闻管理系统 - 统一日志配置模板
|
||||||
使用说明:
|
|
||||||
1. 复制此文件到各模块的 src/main/resources/ 目录下,重命名为 log4j2-spring.xml
|
|
||||||
2. 修改 FILE_NAME 属性为对应的模块名称
|
|
||||||
3. 在 application.yml 中添加:
|
|
||||||
logging:
|
|
||||||
config: classpath:log4j2-spring.xml
|
|
||||||
-->
|
-->
|
||||||
<configuration status="WARN" monitorInterval="30">
|
<configuration status="WARN" monitorInterval="30">
|
||||||
<!--日志级别以及优先级排序: OFF > FATAL > ERROR > WARN > INFO > DEBUG > TRACE > ALL -->
|
<!--日志级别以及优先级排序: OFF > FATAL > ERROR > WARN > INFO > DEBUG > TRACE > ALL -->
|
||||||
@@ -18,29 +12,32 @@
|
|||||||
<property name="LOG_PATTERN" value="%date{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n" />
|
<property name="LOG_PATTERN" value="%date{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n" />
|
||||||
<!-- 定义日志存储的路径 -->
|
<!-- 定义日志存储的路径 -->
|
||||||
<property name="FILE_PATH" value="./logs" />
|
<property name="FILE_PATH" value="./logs" />
|
||||||
<!-- 修改为对应的模块名称:auth/system/admin/news -->
|
<!-- 模块日志文件名 -->
|
||||||
<property name="FILE_NAME" value="school-news-MODULE_NAME" />
|
<property name="FILE_NAME" value="school-news-MODULE_NAME" />
|
||||||
|
<!-- 设置系统属性 -->
|
||||||
|
<property name="file.encoding" value="UTF-8" />
|
||||||
|
<property name="console.encoding" value="UTF-8" />
|
||||||
</Properties>
|
</Properties>
|
||||||
|
|
||||||
<appenders>
|
<appenders>
|
||||||
|
|
||||||
<console name="Console" target="SYSTEM_OUT">
|
<console name="Console" target="SYSTEM_OUT">
|
||||||
<!--输出日志的格式-->
|
<!--输出日志的格式-->
|
||||||
<PatternLayout pattern="${LOG_PATTERN}"/>
|
<PatternLayout pattern="${LOG_PATTERN}" charset="UTF-8"/>
|
||||||
<!--控制台只输出level及其以上级别的信息(onMatch),其他的直接拒绝(onMismatch)-->
|
<!--控制台输出debug及以上级别的信息-->
|
||||||
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
|
<ThresholdFilter level="debug" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||||
</console>
|
</console>
|
||||||
|
|
||||||
<!--文件会打印出所有信息,这个log每次运行程序会自动清空,由append属性决定,适合临时测试用-->
|
<!--文件会打印出所有信息,这个log每次运行程序会自动清空,由append属性决定,适合临时测试用-->
|
||||||
<File name="Filelog" fileName="${FILE_PATH}/${FILE_NAME}-test.log" append="false">
|
<File name="Filelog" fileName="${FILE_PATH}/${FILE_NAME}-test.log" append="false">
|
||||||
<PatternLayout pattern="${LOG_PATTERN}"/>
|
<PatternLayout pattern="${LOG_PATTERN}" charset="UTF-8"/>
|
||||||
</File>
|
</File>
|
||||||
|
|
||||||
<!-- 这个会打印出所有的info及以下级别的信息,每次大小超过size,则这size大小的日志会自动存入按年份-月份建立的文件夹下面并进行压缩,作为存档-->
|
<!-- 这个会打印出所有的info及以下级别的信息,每次大小超过size,则这size大小的日志会自动存入按年份-月份建立的文件夹下面并进行压缩,作为存档-->
|
||||||
<RollingFile name="RollingFileInfo" fileName="${FILE_PATH}/${FILE_NAME}-info.log" filePattern="${FILE_PATH}/${FILE_NAME}-INFO-%d{yyyy-MM-dd}_%i.log.gz">
|
<RollingFile name="RollingFileInfo" fileName="${FILE_PATH}/${FILE_NAME}-info.log" filePattern="${FILE_PATH}/${FILE_NAME}-INFO-%d{yyyy-MM-dd}_%i.log.gz">
|
||||||
<!--控制台只输出level及以上级别的信息(onMatch),其他的直接拒绝(onMismatch)-->
|
<!--控制台只输出level及以上级别的信息(onMatch),其他的直接拒绝(onMismatch)-->
|
||||||
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
|
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||||
<PatternLayout pattern="${LOG_PATTERN}"/>
|
<PatternLayout pattern="${LOG_PATTERN}" charset="UTF-8"/>
|
||||||
<Policies>
|
<Policies>
|
||||||
<!--interval属性用来指定多久滚动一次,默认是1 hour-->
|
<!--interval属性用来指定多久滚动一次,默认是1 hour-->
|
||||||
<TimeBasedTriggeringPolicy interval="1"/>
|
<TimeBasedTriggeringPolicy interval="1"/>
|
||||||
@@ -54,7 +51,7 @@
|
|||||||
<RollingFile name="RollingFileWarn" fileName="${FILE_PATH}/${FILE_NAME}-warn.log" filePattern="${FILE_PATH}/${FILE_NAME}-WARN-%d{yyyy-MM-dd}_%i.log.gz">
|
<RollingFile name="RollingFileWarn" fileName="${FILE_PATH}/${FILE_NAME}-warn.log" filePattern="${FILE_PATH}/${FILE_NAME}-WARN-%d{yyyy-MM-dd}_%i.log.gz">
|
||||||
<!--控制台只输出level及以上级别的信息(onMatch),其他的直接拒绝(onMismatch)-->
|
<!--控制台只输出level及以上级别的信息(onMatch),其他的直接拒绝(onMismatch)-->
|
||||||
<ThresholdFilter level="warn" onMatch="ACCEPT" onMismatch="DENY"/>
|
<ThresholdFilter level="warn" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||||
<PatternLayout pattern="${LOG_PATTERN}"/>
|
<PatternLayout pattern="${LOG_PATTERN}" charset="UTF-8"/>
|
||||||
<Policies>
|
<Policies>
|
||||||
<!--interval属性用来指定多久滚动一次,默认是1 hour-->
|
<!--interval属性用来指定多久滚动一次,默认是1 hour-->
|
||||||
<TimeBasedTriggeringPolicy interval="1"/>
|
<TimeBasedTriggeringPolicy interval="1"/>
|
||||||
@@ -68,7 +65,7 @@
|
|||||||
<RollingFile name="RollingFileError" fileName="${FILE_PATH}/${FILE_NAME}-error.log" filePattern="${FILE_PATH}/${FILE_NAME}-ERROR-%d{yyyy-MM-dd}_%i.log.gz">
|
<RollingFile name="RollingFileError" fileName="${FILE_PATH}/${FILE_NAME}-error.log" filePattern="${FILE_PATH}/${FILE_NAME}-ERROR-%d{yyyy-MM-dd}_%i.log.gz">
|
||||||
<!--控制台只输出level及以上级别的信息(onMatch),其他的直接拒绝(onMismatch)-->
|
<!--控制台只输出level及以上级别的信息(onMatch),其他的直接拒绝(onMismatch)-->
|
||||||
<ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY"/>
|
<ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||||
<PatternLayout pattern="${LOG_PATTERN}"/>
|
<PatternLayout pattern="${LOG_PATTERN}" charset="UTF-8"/>
|
||||||
<Policies>
|
<Policies>
|
||||||
<!--interval属性用来指定多久滚动一次,默认是1 hour-->
|
<!--interval属性用来指定多久滚动一次,默认是1 hour-->
|
||||||
<TimeBasedTriggeringPolicy interval="1"/>
|
<TimeBasedTriggeringPolicy interval="1"/>
|
||||||
@@ -94,8 +91,35 @@
|
|||||||
<AppenderRef ref="Console"/>
|
<AppenderRef ref="Console"/>
|
||||||
</Logger>
|
</Logger>
|
||||||
|
|
||||||
<!-- 项目包日志配置 -->
|
<!-- 项目包日志配置 - Auth模块 -->
|
||||||
<Logger name="org.xyzh" level="debug" additivity="false">
|
<Logger name="org.xyzh.auth" level="debug" additivity="false">
|
||||||
|
<AppenderRef ref="Console"/>
|
||||||
|
<AppenderRef ref="Filelog"/>
|
||||||
|
<AppenderRef ref="RollingFileInfo"/>
|
||||||
|
<AppenderRef ref="RollingFileWarn"/>
|
||||||
|
<AppenderRef ref="RollingFileError"/>
|
||||||
|
</Logger>
|
||||||
|
|
||||||
|
<!-- 项目包日志配置 - System模块 -->
|
||||||
|
<Logger name="org.xyzh.system" level="debug" additivity="false">
|
||||||
|
<AppenderRef ref="Console"/>
|
||||||
|
<AppenderRef ref="Filelog"/>
|
||||||
|
<AppenderRef ref="RollingFileInfo"/>
|
||||||
|
<AppenderRef ref="RollingFileWarn"/>
|
||||||
|
<AppenderRef ref="RollingFileError"/>
|
||||||
|
</Logger>
|
||||||
|
|
||||||
|
<!-- 项目包日志配置 - News模块 -->
|
||||||
|
<Logger name="org.xyzh.news" level="debug" additivity="false">
|
||||||
|
<AppenderRef ref="Console"/>
|
||||||
|
<AppenderRef ref="Filelog"/>
|
||||||
|
<AppenderRef ref="RollingFileInfo"/>
|
||||||
|
<AppenderRef ref="RollingFileWarn"/>
|
||||||
|
<AppenderRef ref="RollingFileError"/>
|
||||||
|
</Logger>
|
||||||
|
|
||||||
|
<!-- 项目包日志配置 - Common模块 -->
|
||||||
|
<Logger name="org.xyzh.common" level="debug" additivity="false">
|
||||||
<AppenderRef ref="Console"/>
|
<AppenderRef ref="Console"/>
|
||||||
<AppenderRef ref="Filelog"/>
|
<AppenderRef ref="Filelog"/>
|
||||||
<AppenderRef ref="RollingFileInfo"/>
|
<AppenderRef ref="RollingFileInfo"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user