diff --git a/db/nacos.sql b/db/nacos.sql
index a1fde34..82cf265 100644
--- a/db/nacos.sql
+++ b/db/nacos.sql
@@ -11,7 +11,7 @@
Target Server Version : 50732
File Encoding : 65001
- Date: 17/08/2022 18:13:57
+ Date: 18/08/2022 18:47:33
*/
SET NAMES utf8mb4;
@@ -40,14 +40,16 @@ CREATE TABLE `config_info` (
`c_schema` text CHARACTER SET utf8 COLLATE utf8_bin NULL,
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `uk_configinfo_datagrouptenant`(`data_id`, `group_id`, `tenant_id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 14 CHARACTER SET = utf8 COLLATE = utf8_bin COMMENT = 'config_info' ROW_FORMAT = Dynamic;
+) ENGINE = InnoDB AUTO_INCREMENT = 22 CHARACTER SET = utf8 COLLATE = utf8_bin COMMENT = 'config_info' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of config_info
-- ----------------------------
INSERT INTO `config_info` VALUES (9, 'zyjblogs-oauth-test.yml', 'public', 'server:\n port: 9029\nspring:\n devtools:\n add-properties: true\n application:\n name: zyjblogs-oauth\n datasource:\n driver-class-name: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://127.0.0.1:3306/zyjblogs_rbac?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&autoReconnect=true&failOverReadOnly=false&allowMultiQueries=true&serverTimezone=GMT%2B8\n username: root\n password: 123456\n\n redis:\n host: 127.0.0.1\n port: 6379\n password: \n timeout: 10000 #连接超时时间(毫秒)\n lettuce:\n pool:\n max-active: 8 # 连接池最大连接数\n max-wait: -1ms # 连接池最大阻塞等待时间(使用负值表示没有限制)\n min-idle: 0 # 连接池中的最小空闲连接\n max-idle: 8 # 连接池中的最大空闲连接\n # sentinel:\n # master: ${hatech.global.redis.sentinel.master}\n # nodes: ${hatech.global.redis.sentinel.nodes}\n # password: ${hatech.global.redis.sentinel.password}\nmybatis-plus:\n mapper-locations: classpath:mapper/**/*.xml\n global-config:\n db-config:\n #主键策略:assign_id(雪花算法)、assign_uuid(去下划线的UUID)\n id-type: assign_id\n configuration:\n # 是否开启自动驼峰命名规则映射:从数据库列名到Java属性驼峰命名的类似映射\n map-underscore-to-camel-case: true\n # 如果查询结果中包含空值的列,则 MyBatis 在映射的时候,不会映射这个字段\n call-setters-on-nulls: false\n # 这个配置会将执行的sql打印出来,在开发或测试的时候可以用\n # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl\n log-impl: org.apache.ibatis.logging.stdout.StdOutImpl\nfeign:\n sentinel:\n enabled: true\n\nribbon:\n ReadTimeout: 6000 # 请求处理的超时时间\n ConnectTimeout: 3000 # 请求连接的超时时间\n MaxAutoRetries: 1 # 重试策略先尝试访问首选实例一次,失败后才会更换实例访问\n MaxAutoRetriesNextServer: 1 # 更换实例访问的次数:通过参数设置为2, 所以会尝试更换2次实例进行重试\n OkToRetryOnAllOperations: true # 开启对请求进行行重试\n\n\nmanagement:\n health:\n ldap:\n enabled: false\n endpoints:\n web:\n exposure:\n include: \'health\'\n endpoint:\n health:\n show-details: always', '713b49c57ee2be922797bfca5df170fb', '2022-08-17 17:35:05', '2022-08-17 17:57:11', 'nacos', '127.0.0.1', '', 'test', '', '', '', 'yaml', '');
-INSERT INTO `config_info` VALUES (10, 'zyjblogs-global-test.yml', 'global', 'none', '334c4a4c42fdb79d7ebc3e73b517e6f8', '2022-08-17 17:35:39', '2022-08-17 17:35:39', 'nacos', '127.0.0.1', '', 'test', NULL, NULL, NULL, 'text', NULL);
+INSERT INTO `config_info` VALUES (10, 'zyjblogs-global-test.yml', 'global', 'zyjblogs:\n global:\n database:\n host: 127.0.0.1\n port: 3006\n username: root\n password: 123456!@#\n\n redis:\n host: 127.0.0.1\n port: 6379\n password: \n sentinel:\n master: mymaster\n nodes: 10.1.110.71:30029,10.1.110.72:30029,10.1.110.73:30029\n password: Redis_IStorM_1618\n \n sentinel:\n transport:\n port: 8179\n dashboard:\n host: 127.0.0.1\n port: 20000\n\n rabbitmq:\n host: 127.0.0.1\n port: 30110\n username: admin\n password: admin\n minio:\n accessKey: minioadmin\n endpoint: http://10.1.110.70:30120/\n secretKey: Minio_IStorM_1618\n xxl:\n job:\n admin:\n addresses: http://10.1.110.71:10090/xxl-job-admin\n accessToken: cee8d3f4791411eca519005056b38058\n executor:\n logretentiondays: 7\n ', '5971eba0ff27324509b98209371e2e1f', '2022-08-17 17:35:39', '2022-08-18 09:33:28', 'nacos', '127.0.0.1', '', 'test', '', '', '', 'yaml', '');
INSERT INTO `config_info` VALUES (12, 'zyjblogs-rbac-test.yml', 'public', 'server:\r\n port: 9039\r\nspring:\r\n devtools:\r\n add-properties: true\r\n application:\r\n name: zyjblogs-rbac\r\n datasource:\r\n driver-class-name: com.mysql.cj.jdbc.Driver\r\n url: jdbc:mysql://127.0.0.1:3306/zyjblogs_rbac?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&autoReconnect=true&failOverReadOnly=false&allowMultiQueries=true&serverTimezone=GMT%2B8\r\n username: root\r\n password: 123456\r\nmybatis-plus:\r\n mapper-locations: classpath:mapper/**/*.xml\r\n global-config:\r\n db-config:\r\n #主键策略:assign_id(雪花算法)、assign_uuid(去下划线的UUID)\r\n id-type: assign_id\r\n configuration:\r\n # 是否开启自动驼峰命名规则映射:从数据库列名到Java属性驼峰命名的类似映射\r\n map-underscore-to-camel-case: true\r\n # 如果查询结果中包含空值的列,则 MyBatis 在映射的时候,不会映射这个字段\r\n call-setters-on-nulls: false\r\n # 这个配置会将执行的sql打印出来,在开发或测试的时候可以用\r\n # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl\r\n log-impl: org.apache.ibatis.logging.stdout.StdOutImpl\r\nfeign:\r\n sentinel:\r\n enabled: true\r\n\r\nribbon:\r\n ReadTimeout: 6000 # 请求处理的超时时间\r\n ConnectTimeout: 3000 # 请求连接的超时时间\r\n MaxAutoRetries: 1 # 重试策略先尝试访问首选实例一次,失败后才会更换实例访问\r\n MaxAutoRetriesNextServer: 1 # 更换实例访问的次数:通过参数设置为2, 所以会尝试更换2次实例进行重试\r\n OkToRetryOnAllOperations: true # 开启对请求进行行重试\r\n\r\n\r\nmanagement:\r\n health:\r\n ldap:\r\n enabled: false\r\n endpoints:\r\n web:\r\n exposure:\r\n include: \'health\'\r\n endpoint:\r\n health:\r\n show-details: always', 'bfd132739c919b446e0256345adad019', '2022-08-17 17:48:38', '2022-08-17 17:48:38', 'nacos', '127.0.0.1', '', 'test', NULL, NULL, NULL, 'yaml', NULL);
+INSERT INTO `config_info` VALUES (14, 'zyjblogs-gateway-test.yml', 'public', '#通常情况下,只需要改config配置\nzyjblogs:\n config:\n server-port: 9019\n whilelist:\n allowPaths:\n - /v2/api-docs/**\n - /oauth/token\n - /oauth/check_token\n - /user/login\n\nserver:\n port: ${zyjblogs.config.server-port}\nspring:\n main:\n allow-bean-definition-overriding: true\n servlet:\n multipart:\n enabled: true\n max-file-size: 20MB\n max-request-size: 100MB\n redis:\n host: ${zyjblogs.global.redis.host}\n port: ${zyjblogs.global.redis.port}\n password: ${zyjblogs.global.redis.password}\n timeout: 10000 #连接超时时间(毫秒)\n lettuce:\n pool:\n max-active: 8 # 连接池最大连接数\n max-wait: -1ms # 连接池最大阻塞等待时间(使用负值表示没有限制)\n min-idle: 0 # 连接池中的最小空闲连接\n max-idle: 8 # 连接池中的最大空闲连接\n\n cloud:\n sentinel:\n datasource:\n ds1:\n nacos:\n username: ${spring.cloud.nacos.config.username}\n password: ${spring.cloud.nacos.config.password}\n namespace: ${spring.cloud.nacos.config.namespace}\n server-addr: ${spring.cloud.nacos.config.server-addr}\n group-id: SENTINEL_GROUP\n rule-type: flow\n data-id: ${spring.application.name}-sentinel\n data-type: json\n transport:\n port: ${zyjblogs.global.sentinel.transport.port}\n dashboard: ${zyjblogs.global.sentinel.transport.dashboard.host}:${hatech.global.sentinel.transport.dashboard.port}\n gateway:\n httpclient:\n websocket:\n #websocket最大传输长度,单位(b),默认为64kb,最大为Integer.MAX_VALUE\n max-frame-payload-length: 0x7fffffff\n discovery:\n locator:\n enabled: true\n routes:\n - id: zyjblogs-oauth\n uri: lb://zyjblogs-oauth\n predicates:\n - Path=/api/oauth/**\n filters:\n - StripPrefix=2\n - id: zyjblogs-rbac\n uri: lb://zyjblogs-rbac\n predicates:\n - Path=/api/rbac/**\n filters:\n - StripPrefix=2\n\nfeign:\n sentinel:\n enabled: true\n\nribbon:\n ReadTimeout: 90000 # 请求处理的超时时间\n ConnectTimeout: 3000 # 请求连接的超时时间\n MaxAutoRetries: 1 # 重试策略先尝试访问首选实例一次,失败后才会更换实例访问\n MaxAutoRetriesNextServer: 2 # 更换实例访问的次数:通过参数设置为2, 所以会尝试更换2次实例进行重试\n OkToRetryOnAllOperations: true # 开启对请求进行行重试\n\nmanagement:\n endpoints:\n web:\n exposure:\n include: \'health\'\n endpoint:\n health:\n show-details: always\n', 'de451d96d9134835784db63cfc88734c', '2022-08-18 09:26:44', '2022-08-18 10:22:05', 'nacos', '127.0.0.1', '', 'test', '', '', '', 'yaml', '');
+INSERT INTO `config_info` VALUES (18, 'zyjblogs-gateway-sentinel', 'DEFAULT_GROUP', '[\r\n]', 'fdaf133263369980df600fd06ce738ec', '2022-08-18 09:45:59', '2022-08-18 09:45:59', NULL, '127.0.0.1', '', 'test', NULL, NULL, NULL, 'json', NULL);
-- ----------------------------
-- Table structure for config_info_aggr
@@ -186,7 +188,7 @@ CREATE TABLE `his_config_info` (
INDEX `idx_gmt_create`(`gmt_create`) USING BTREE,
INDEX `idx_gmt_modified`(`gmt_modified`) USING BTREE,
INDEX `idx_did`(`data_id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 18 CHARACTER SET = utf8 COLLATE = utf8_bin COMMENT = '多租户改造' ROW_FORMAT = Dynamic;
+) ENGINE = InnoDB AUTO_INCREMENT = 26 CHARACTER SET = utf8 COLLATE = utf8_bin COMMENT = '多租户改造' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of his_config_info
@@ -196,6 +198,14 @@ INSERT INTO `his_config_info` VALUES (0, 14, 'zyjblogs-global-test.yml', 'global
INSERT INTO `his_config_info` VALUES (9, 15, 'zyjblogs-oauth-test.yml', 'public', '', 'server:\r\n port: 9029\r\nspring:\r\n application:\r\n name: zyjblogs-oauth\r\n datasource:\r\n driver-class-name: com.mysql.cj.jdbc.Driver\r\n url: jdbc:mysql://127.0.0.1:3306/zyjblogs_rbac?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&autoReconnect=true&failOverReadOnly=false&allowMultiQueries=true&serverTimezone=GMT%2B8\r\n username: root\r\n password: 123456\r\nmybatis-plus:\r\n mapper-locations: classpath:mapper/**/*.xml\r\n global-config:\r\n db-config:\r\n #主键策略:assign_id(雪花算法)、assign_uuid(去下划线的UUID)\r\n id-type: assign_id\r\n configuration:\r\n # 是否开启自动驼峰命名规则映射:从数据库列名到Java属性驼峰命名的类似映射\r\n map-underscore-to-camel-case: true\r\n # 如果查询结果中包含空值的列,则 MyBatis 在映射的时候,不会映射这个字段\r\n call-setters-on-nulls: false\r\n # 这个配置会将执行的sql打印出来,在开发或测试的时候可以用\r\n # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl\r\n log-impl: org.apache.ibatis.logging.stdout.StdOutImpl\r\nfeign:\r\n sentinel:\r\n enabled: true\r\n\r\nribbon:\r\n ReadTimeout: 6000 # 请求处理的超时时间\r\n ConnectTimeout: 3000 # 请求连接的超时时间\r\n MaxAutoRetries: 1 # 重试策略先尝试访问首选实例一次,失败后才会更换实例访问\r\n MaxAutoRetriesNextServer: 1 # 更换实例访问的次数:通过参数设置为2, 所以会尝试更换2次实例进行重试\r\n OkToRetryOnAllOperations: true # 开启对请求进行行重试\r\n\r\n\r\nmanagement:\r\n health:\r\n ldap:\r\n enabled: false\r\n endpoints:\r\n web:\r\n exposure:\r\n include: \'health\'\r\n endpoint:\r\n health:\r\n show-details: always', '9e77325d3793a367542452cb4aa3610e', '2022-08-17 17:44:16', '2022-08-17 17:44:17', 'nacos', '127.0.0.1', 'U', 'test');
INSERT INTO `his_config_info` VALUES (0, 16, 'zyjblogs-rbac-test.yml', 'public', '', 'server:\r\n port: 9039\r\nspring:\r\n devtools:\r\n add-properties: true\r\n application:\r\n name: zyjblogs-rbac\r\n datasource:\r\n driver-class-name: com.mysql.cj.jdbc.Driver\r\n url: jdbc:mysql://127.0.0.1:3306/zyjblogs_rbac?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&autoReconnect=true&failOverReadOnly=false&allowMultiQueries=true&serverTimezone=GMT%2B8\r\n username: root\r\n password: 123456\r\nmybatis-plus:\r\n mapper-locations: classpath:mapper/**/*.xml\r\n global-config:\r\n db-config:\r\n #主键策略:assign_id(雪花算法)、assign_uuid(去下划线的UUID)\r\n id-type: assign_id\r\n configuration:\r\n # 是否开启自动驼峰命名规则映射:从数据库列名到Java属性驼峰命名的类似映射\r\n map-underscore-to-camel-case: true\r\n # 如果查询结果中包含空值的列,则 MyBatis 在映射的时候,不会映射这个字段\r\n call-setters-on-nulls: false\r\n # 这个配置会将执行的sql打印出来,在开发或测试的时候可以用\r\n # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl\r\n log-impl: org.apache.ibatis.logging.stdout.StdOutImpl\r\nfeign:\r\n sentinel:\r\n enabled: true\r\n\r\nribbon:\r\n ReadTimeout: 6000 # 请求处理的超时时间\r\n ConnectTimeout: 3000 # 请求连接的超时时间\r\n MaxAutoRetries: 1 # 重试策略先尝试访问首选实例一次,失败后才会更换实例访问\r\n MaxAutoRetriesNextServer: 1 # 更换实例访问的次数:通过参数设置为2, 所以会尝试更换2次实例进行重试\r\n OkToRetryOnAllOperations: true # 开启对请求进行行重试\r\n\r\n\r\nmanagement:\r\n health:\r\n ldap:\r\n enabled: false\r\n endpoints:\r\n web:\r\n exposure:\r\n include: \'health\'\r\n endpoint:\r\n health:\r\n show-details: always', 'bfd132739c919b446e0256345adad019', '2022-08-17 17:48:37', '2022-08-17 17:48:38', 'nacos', '127.0.0.1', 'I', 'test');
INSERT INTO `his_config_info` VALUES (9, 17, 'zyjblogs-oauth-test.yml', 'public', '', 'server:\n port: 9029\nspring:\n devtools:\n add-properties: true\n application:\n name: zyjblogs-oauth\n datasource:\n driver-class-name: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://127.0.0.1:3306/zyjblogs_rbac?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&autoReconnect=true&failOverReadOnly=false&allowMultiQueries=true&serverTimezone=GMT%2B8\n username: root\n password: 123456\nmybatis-plus:\n mapper-locations: classpath:mapper/**/*.xml\n global-config:\n db-config:\n #主键策略:assign_id(雪花算法)、assign_uuid(去下划线的UUID)\n id-type: assign_id\n configuration:\n # 是否开启自动驼峰命名规则映射:从数据库列名到Java属性驼峰命名的类似映射\n map-underscore-to-camel-case: true\n # 如果查询结果中包含空值的列,则 MyBatis 在映射的时候,不会映射这个字段\n call-setters-on-nulls: false\n # 这个配置会将执行的sql打印出来,在开发或测试的时候可以用\n # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl\n log-impl: org.apache.ibatis.logging.stdout.StdOutImpl\nfeign:\n sentinel:\n enabled: true\n\nribbon:\n ReadTimeout: 6000 # 请求处理的超时时间\n ConnectTimeout: 3000 # 请求连接的超时时间\n MaxAutoRetries: 1 # 重试策略先尝试访问首选实例一次,失败后才会更换实例访问\n MaxAutoRetriesNextServer: 1 # 更换实例访问的次数:通过参数设置为2, 所以会尝试更换2次实例进行重试\n OkToRetryOnAllOperations: true # 开启对请求进行行重试\n\n\nmanagement:\n health:\n ldap:\n enabled: false\n endpoints:\n web:\n exposure:\n include: \'health\'\n endpoint:\n health:\n show-details: always', '1927b9538ce0dec948d93fce91d46295', '2022-08-17 17:57:11', '2022-08-17 17:57:11', 'nacos', '127.0.0.1', 'U', 'test');
+INSERT INTO `his_config_info` VALUES (0, 18, 'zyjblogs-gateway-test.yml', 'public', '', '#通常情况下,只需要改config配置\r\nhatech:\r\n config:\r\n server-port: 10010\r\n whilelist:\r\n allowPaths:\r\n - /v2/api-docs/**\r\n - /oauth/token\r\n - /user/login\r\n - /license/import\r\n - /role/dev/all\r\n - /home/page/cluster/config\r\n - /application/backup/edit/**\r\n - /home/page/cluster/config/info\r\n - /word/socket\r\n - /application/backup/call/hook/*\r\n - /quota/pageAll\r\n - /quota/pageById\r\n - /alertManager/**\r\n - /user/list/user-group-tree\r\n - /oauth/authorize\r\n - /oauth/getToken\r\n - /oauth/getUserInfo\r\n\r\nserver:\r\n port: ${hatech.config.server-port}\r\nspring:\r\n main:\r\n allow-bean-definition-overriding: true\r\n servlet:\r\n multipart:\r\n enabled: true\r\n max-file-size: 20MB\r\n max-request-size: 100MB\r\n redis:\r\n host: ${hatech.global.redis.host}\r\n port: ${hatech.global.redis.port}\r\n password: ${hatech.global.redis.password}\r\n timeout: 10000 #连接超时时间(毫秒)\r\n lettuce:\r\n pool:\r\n max-active: 8 # 连接池最大连接数\r\n max-wait: -1ms # 连接池最大阻塞等待时间(使用负值表示没有限制)\r\n min-idle: 0 # 连接池中的最小空闲连接\r\n max-idle: 8 # 连接池中的最大空闲连接\r\n sentinel:\r\n master: ${hatech.global.redis.sentinel.master}\r\n nodes: ${hatech.global.redis.sentinel.nodes}\r\n password: ${hatech.global.redis.sentinel.password}\r\n cloud:\r\n alibaba:\r\n seata:\r\n # 配置分布式事务的分组名称\r\n tx-service-group: hatech-seata-tx-service-group\r\n sentinel:\r\n datasource:\r\n ds1:\r\n nacos:\r\n username: ${spring.cloud.nacos.config.username}\r\n password: ${spring.cloud.nacos.config.password}\r\n namespace: ${spring.cloud.nacos.config.namespace}\r\n server-addr: ${spring.cloud.nacos.config.server-addr}\r\n group-id: SENTINEL_GROUP\r\n rule-type: flow\r\n data-id: ${spring.application.name}-sentinel\r\n data-type: json\r\n transport:\r\n port: ${hatech.global.sentinel.transport.port}\r\n dashboard: ${hatech.global.sentinel.transport.dashboard.host}:${hatech.global.sentinel.transport.dashboard.port}\r\n gateway:\r\n httpclient:\r\n websocket:\r\n #websocket最大传输长度,单位(b),默认为64kb,最大为Integer.MAX_VALUE\r\n max-frame-payload-length: 0x7fffffff\r\n discovery:\r\n locator:\r\n enabled: false\r\n routes:\r\n - id: zyjblogs-oauth\r\n uri: lb://zyjblogs-oauth\r\n predicates:\r\n - Path=/api/oauth/**\r\n filters:\r\n - StripPrefix=2\r\n - id: zyjblogs-rbac\r\n uri: lb://zyjblogs-rbac\r\n predicates:\r\n - Path=/api/rbac/**\r\n filters:\r\n - StripPrefix=2\r\n\r\nfeign:\r\n sentinel:\r\n enabled: true\r\n\r\nribbon:\r\n ReadTimeout: 90000 # 请求处理的超时时间\r\n ConnectTimeout: 3000 # 请求连接的超时时间\r\n MaxAutoRetries: 1 # 重试策略先尝试访问首选实例一次,失败后才会更换实例访问\r\n MaxAutoRetriesNextServer: 2 # 更换实例访问的次数:通过参数设置为2, 所以会尝试更换2次实例进行重试\r\n OkToRetryOnAllOperations: true # 开启对请求进行行重试\r\n\r\nmanagement:\r\n endpoints:\r\n web:\r\n exposure:\r\n include: \'health\'\r\n endpoint:\r\n health:\r\n show-details: always\r\n', '8e07052c2a26fcbc9f96a56babbb3daa', '2022-08-18 09:26:43', '2022-08-18 09:26:44', NULL, '127.0.0.1', 'I', 'test');
+INSERT INTO `his_config_info` VALUES (14, 19, 'zyjblogs-gateway-test.yml', 'public', '', '#通常情况下,只需要改config配置\r\nhatech:\r\n config:\r\n server-port: 10010\r\n whilelist:\r\n allowPaths:\r\n - /v2/api-docs/**\r\n - /oauth/token\r\n - /user/login\r\n - /license/import\r\n - /role/dev/all\r\n - /home/page/cluster/config\r\n - /application/backup/edit/**\r\n - /home/page/cluster/config/info\r\n - /word/socket\r\n - /application/backup/call/hook/*\r\n - /quota/pageAll\r\n - /quota/pageById\r\n - /alertManager/**\r\n - /user/list/user-group-tree\r\n - /oauth/authorize\r\n - /oauth/getToken\r\n - /oauth/getUserInfo\r\n\r\nserver:\r\n port: ${hatech.config.server-port}\r\nspring:\r\n main:\r\n allow-bean-definition-overriding: true\r\n servlet:\r\n multipart:\r\n enabled: true\r\n max-file-size: 20MB\r\n max-request-size: 100MB\r\n redis:\r\n host: ${hatech.global.redis.host}\r\n port: ${hatech.global.redis.port}\r\n password: ${hatech.global.redis.password}\r\n timeout: 10000 #连接超时时间(毫秒)\r\n lettuce:\r\n pool:\r\n max-active: 8 # 连接池最大连接数\r\n max-wait: -1ms # 连接池最大阻塞等待时间(使用负值表示没有限制)\r\n min-idle: 0 # 连接池中的最小空闲连接\r\n max-idle: 8 # 连接池中的最大空闲连接\r\n sentinel:\r\n master: ${hatech.global.redis.sentinel.master}\r\n nodes: ${hatech.global.redis.sentinel.nodes}\r\n password: ${hatech.global.redis.sentinel.password}\r\n cloud:\r\n alibaba:\r\n seata:\r\n # 配置分布式事务的分组名称\r\n tx-service-group: hatech-seata-tx-service-group\r\n sentinel:\r\n datasource:\r\n ds1:\r\n nacos:\r\n username: ${spring.cloud.nacos.config.username}\r\n password: ${spring.cloud.nacos.config.password}\r\n namespace: ${spring.cloud.nacos.config.namespace}\r\n server-addr: ${spring.cloud.nacos.config.server-addr}\r\n group-id: SENTINEL_GROUP\r\n rule-type: flow\r\n data-id: ${spring.application.name}-sentinel\r\n data-type: json\r\n transport:\r\n port: ${hatech.global.sentinel.transport.port}\r\n dashboard: ${hatech.global.sentinel.transport.dashboard.host}:${hatech.global.sentinel.transport.dashboard.port}\r\n gateway:\r\n httpclient:\r\n websocket:\r\n #websocket最大传输长度,单位(b),默认为64kb,最大为Integer.MAX_VALUE\r\n max-frame-payload-length: 0x7fffffff\r\n discovery:\r\n locator:\r\n enabled: false\r\n routes:\r\n - id: zyjblogs-oauth\r\n uri: lb://zyjblogs-oauth\r\n predicates:\r\n - Path=/api/oauth/**\r\n filters:\r\n - StripPrefix=2\r\n - id: zyjblogs-rbac\r\n uri: lb://zyjblogs-rbac\r\n predicates:\r\n - Path=/api/rbac/**\r\n filters:\r\n - StripPrefix=2\r\n\r\nfeign:\r\n sentinel:\r\n enabled: true\r\n\r\nribbon:\r\n ReadTimeout: 90000 # 请求处理的超时时间\r\n ConnectTimeout: 3000 # 请求连接的超时时间\r\n MaxAutoRetries: 1 # 重试策略先尝试访问首选实例一次,失败后才会更换实例访问\r\n MaxAutoRetriesNextServer: 2 # 更换实例访问的次数:通过参数设置为2, 所以会尝试更换2次实例进行重试\r\n OkToRetryOnAllOperations: true # 开启对请求进行行重试\r\n\r\nmanagement:\r\n endpoints:\r\n web:\r\n exposure:\r\n include: \'health\'\r\n endpoint:\r\n health:\r\n show-details: always\r\n', '8e07052c2a26fcbc9f96a56babbb3daa', '2022-08-18 09:32:11', '2022-08-18 09:32:11', 'nacos', '127.0.0.1', 'U', 'test');
+INSERT INTO `his_config_info` VALUES (10, 20, 'zyjblogs-global-test.yml', 'global', '', 'none', '334c4a4c42fdb79d7ebc3e73b517e6f8', '2022-08-18 09:33:28', '2022-08-18 09:33:28', 'nacos', '127.0.0.1', 'U', 'test');
+INSERT INTO `his_config_info` VALUES (14, 21, 'zyjblogs-gateway-test.yml', 'public', '', '#通常情况下,只需要改config配置\nzyjblogs:\n config:\n server-port: 9019\n whilelist:\n allowPaths:\n - /v2/api-docs/**\n - /oauth/token\n - /oauth/check_token\n - /user/login\n\nserver:\n port: ${zyjblogs.config.server-port}\nspring:\n main:\n allow-bean-definition-overriding: true\n servlet:\n multipart:\n enabled: true\n max-file-size: 20MB\n max-request-size: 100MB\n redis:\n host: ${hatech.global.redis.host}\n port: ${hatech.global.redis.port}\n password: ${hatech.global.redis.password}\n timeout: 10000 #连接超时时间(毫秒)\n lettuce:\n pool:\n max-active: 8 # 连接池最大连接数\n max-wait: -1ms # 连接池最大阻塞等待时间(使用负值表示没有限制)\n min-idle: 0 # 连接池中的最小空闲连接\n max-idle: 8 # 连接池中的最大空闲连接\n\n cloud:\n sentinel:\n datasource:\n ds1:\n nacos:\n username: ${spring.cloud.nacos.config.username}\n password: ${spring.cloud.nacos.config.password}\n namespace: ${spring.cloud.nacos.config.namespace}\n server-addr: ${spring.cloud.nacos.config.server-addr}\n group-id: SENTINEL_GROUP\n rule-type: flow\n data-id: ${spring.application.name}-sentinel\n data-type: json\n transport:\n port: ${zyjblogs.global.sentinel.transport.port}\n dashboard: ${zyjblogs.global.sentinel.transport.dashboard.host}:${hatech.global.sentinel.transport.dashboard.port}\n gateway:\n httpclient:\n websocket:\n #websocket最大传输长度,单位(b),默认为64kb,最大为Integer.MAX_VALUE\n max-frame-payload-length: 0x7fffffff\n discovery:\n locator:\n enabled: false\n routes:\n - id: zyjblogs-oauth\n uri: lb://zyjblogs-oauth\n predicates:\n - Path=/api/oauth/**\n filters:\n - StripPrefix=2\n - id: zyjblogs-rbac\n uri: lb://zyjblogs-rbac\n predicates:\n - Path=/api/rbac/**\n filters:\n - StripPrefix=2\n\nfeign:\n sentinel:\n enabled: true\n\nribbon:\n ReadTimeout: 90000 # 请求处理的超时时间\n ConnectTimeout: 3000 # 请求连接的超时时间\n MaxAutoRetries: 1 # 重试策略先尝试访问首选实例一次,失败后才会更换实例访问\n MaxAutoRetriesNextServer: 2 # 更换实例访问的次数:通过参数设置为2, 所以会尝试更换2次实例进行重试\n OkToRetryOnAllOperations: true # 开启对请求进行行重试\n\nmanagement:\n endpoints:\n web:\n exposure:\n include: \'health\'\n endpoint:\n health:\n show-details: always\n', 'ccf648c4bc8ff739feca11d0e2fa1f3b', '2022-08-18 09:43:28', '2022-08-18 09:43:29', 'nacos', '127.0.0.1', 'U', 'test');
+INSERT INTO `his_config_info` VALUES (0, 22, 'zyjblogs-gateway-sentinel', 'DEFAULT_GROUP', '', '[\r\n]', 'fdaf133263369980df600fd06ce738ec', '2022-08-18 09:45:59', '2022-08-18 09:45:59', NULL, '127.0.0.1', 'I', 'test');
+INSERT INTO `his_config_info` VALUES (14, 23, 'zyjblogs-gateway-test.yml', 'public', '', '#通常情况下,只需要改config配置\nzyjblogs:\n config:\n server-port: 9019\n whilelist:\n allowPaths:\n - /v2/api-docs/**\n - /oauth/token\n - /oauth/check_token\n - /user/login\n\nserver:\n port: ${zyjblogs.config.server-port}\nspring:\n main:\n allow-bean-definition-overriding: true\n servlet:\n multipart:\n enabled: true\n max-file-size: 20MB\n max-request-size: 100MB\n redis:\n host: ${zyjbblogs.global.redis.host}\n port: ${zyjbblogs.global.redis.port}\n password: ${zyjbblogs.global.redis.password}\n timeout: 10000 #连接超时时间(毫秒)\n lettuce:\n pool:\n max-active: 8 # 连接池最大连接数\n max-wait: -1ms # 连接池最大阻塞等待时间(使用负值表示没有限制)\n min-idle: 0 # 连接池中的最小空闲连接\n max-idle: 8 # 连接池中的最大空闲连接\n\n cloud:\n sentinel:\n datasource:\n ds1:\n nacos:\n username: ${spring.cloud.nacos.config.username}\n password: ${spring.cloud.nacos.config.password}\n namespace: ${spring.cloud.nacos.config.namespace}\n server-addr: ${spring.cloud.nacos.config.server-addr}\n group-id: SENTINEL_GROUP\n rule-type: flow\n data-id: ${spring.application.name}-sentinel\n data-type: json\n transport:\n port: ${zyjblogs.global.sentinel.transport.port}\n dashboard: ${zyjblogs.global.sentinel.transport.dashboard.host}:${hatech.global.sentinel.transport.dashboard.port}\n gateway:\n httpclient:\n websocket:\n #websocket最大传输长度,单位(b),默认为64kb,最大为Integer.MAX_VALUE\n max-frame-payload-length: 0x7fffffff\n discovery:\n locator:\n enabled: false\n routes:\n - id: zyjblogs-oauth\n uri: lb://zyjblogs-oauth\n predicates:\n - Path=/api/oauth/**\n filters:\n - StripPrefix=2\n - id: zyjblogs-rbac\n uri: lb://zyjblogs-rbac\n predicates:\n - Path=/api/rbac/**\n filters:\n - StripPrefix=2\n\nfeign:\n sentinel:\n enabled: true\n\nribbon:\n ReadTimeout: 90000 # 请求处理的超时时间\n ConnectTimeout: 3000 # 请求连接的超时时间\n MaxAutoRetries: 1 # 重试策略先尝试访问首选实例一次,失败后才会更换实例访问\n MaxAutoRetriesNextServer: 2 # 更换实例访问的次数:通过参数设置为2, 所以会尝试更换2次实例进行重试\n OkToRetryOnAllOperations: true # 开启对请求进行行重试\n\nmanagement:\n endpoints:\n web:\n exposure:\n include: \'health\'\n endpoint:\n health:\n show-details: always\n', 'a2e43ef4a61c33f9c5f2493c8548ae4e', '2022-08-18 09:49:15', '2022-08-18 09:49:15', 'nacos', '127.0.0.1', 'U', 'test');
+INSERT INTO `his_config_info` VALUES (14, 24, 'zyjblogs-gateway-test.yml', 'public', '', '#通常情况下,只需要改config配置\nzyjblogs:\n config:\n server-port: 9019\n whilelist:\n allowPaths:\n - /v2/api-docs/**\n - /oauth/token\n - /oauth/check_token\n - /user/login\n\nserver:\n port: ${zyjblogs.config.server-port}\nspring:\n main:\n allow-bean-definition-overriding: true\n servlet:\n multipart:\n enabled: true\n max-file-size: 20MB\n max-request-size: 100MB\n redis:\n host: ${zyjblogs.global.redis.host}\n port: ${zyjblogs.global.redis.port}\n password: ${zyjblogs.global.redis.password}\n timeout: 10000 #连接超时时间(毫秒)\n lettuce:\n pool:\n max-active: 8 # 连接池最大连接数\n max-wait: -1ms # 连接池最大阻塞等待时间(使用负值表示没有限制)\n min-idle: 0 # 连接池中的最小空闲连接\n max-idle: 8 # 连接池中的最大空闲连接\n\n cloud:\n sentinel:\n datasource:\n ds1:\n nacos:\n username: ${spring.cloud.nacos.config.username}\n password: ${spring.cloud.nacos.config.password}\n namespace: ${spring.cloud.nacos.config.namespace}\n server-addr: ${spring.cloud.nacos.config.server-addr}\n group-id: SENTINEL_GROUP\n rule-type: flow\n data-id: ${spring.application.name}-sentinel\n data-type: json\n transport:\n port: ${zyjblogs.global.sentinel.transport.port}\n dashboard: ${zyjblogs.global.sentinel.transport.dashboard.host}:${hatech.global.sentinel.transport.dashboard.port}\n gateway:\n httpclient:\n websocket:\n #websocket最大传输长度,单位(b),默认为64kb,最大为Integer.MAX_VALUE\n max-frame-payload-length: 0x7fffffff\n discovery:\n locator:\n enabled: false\n routes:\n - id: zyjblogs-oauth\n uri: lb://zyjblogs-oauth\n predicates:\n - Path=/api/oauth/**\n filters:\n - StripPrefix=2\n - id: zyjblogs-rbac\n uri: lb://zyjblogs-rbac\n predicates:\n - Path=/api/rbac/**\n filters:\n - StripPrefix=2\n\nfeign:\n sentinel:\n enabled: true\n\nribbon:\n ReadTimeout: 90000 # 请求处理的超时时间\n ConnectTimeout: 3000 # 请求连接的超时时间\n MaxAutoRetries: 1 # 重试策略先尝试访问首选实例一次,失败后才会更换实例访问\n MaxAutoRetriesNextServer: 2 # 更换实例访问的次数:通过参数设置为2, 所以会尝试更换2次实例进行重试\n OkToRetryOnAllOperations: true # 开启对请求进行行重试\n\nmanagement:\n endpoints:\n web:\n exposure:\n include: \'health\'\n endpoint:\n health:\n show-details: always\n', 'e4023728583537e3de832f65f264503a', '2022-08-18 10:14:00', '2022-08-18 10:14:00', 'nacos', '127.0.0.1', 'U', 'test');
+INSERT INTO `his_config_info` VALUES (14, 25, 'zyjblogs-gateway-test.yml', 'public', '', '#通常情况下,只需要改config配置\nzyjblogs:\n config:\n server-port: 9019\n whilelist:\n allowPaths:\n - /v2/api-docs/**\n - /oauth/token\n - /oauth/check_token\n - /user/login\n\nserver:\n port: ${zyjblogs.config.server-port}\nspring:\n main:\n allow-bean-definition-overriding: true\n servlet:\n multipart:\n enabled: true\n max-file-size: 20MB\n max-request-size: 100MB\n redis:\n host: ${zyjblogs.global.redis.host}\n port: ${zyjblogs.global.redis.port}\n password: ${zyjblogs.global.redis.password}\n timeout: 10000 #连接超时时间(毫秒)\n lettuce:\n pool:\n max-active: 8 # 连接池最大连接数\n max-wait: -1ms # 连接池最大阻塞等待时间(使用负值表示没有限制)\n min-idle: 0 # 连接池中的最小空闲连接\n max-idle: 8 # 连接池中的最大空闲连接\n\n cloud:\n sentinel:\n datasource:\n ds1:\n nacos:\n username: ${spring.cloud.nacos.config.username}\n password: ${spring.cloud.nacos.config.password}\n namespace: ${spring.cloud.nacos.config.namespace}\n server-addr: ${spring.cloud.nacos.config.server-addr}\n group-id: SENTINEL_GROUP\n rule-type: flow\n data-id: ${spring.application.name}-sentinel\n data-type: json\n transport:\n port: ${zyjblogs.global.sentinel.transport.port}\n dashboard: ${zyjblogs.global.sentinel.transport.dashboard.host}:${hatech.global.sentinel.transport.dashboard.port}\n gateway:\n httpclient:\n websocket:\n #websocket最大传输长度,单位(b),默认为64kb,最大为Integer.MAX_VALUE\n max-frame-payload-length: 0x7fffffff\n discovery:\n locator:\n enabled: true\n routes:\n - id: zyjblogs-oauth\n uri: lb://zyjblogs-oauth\n predicates:\n - Path=/api/oauth/**\n filters:\n - StripPrefix=2\n - id: zyjblogs-rbac\n uri: lb://zyjblogs-rbac\n predicates:\n - Path=/api/rbac/**\n filters:\n - StripPrefix=2\n\nfeign:\n sentinel:\n enabled: true\n\nribbon:\n ReadTimeout: 90000 # 请求处理的超时时间\n ConnectTimeout: 3000 # 请求连接的超时时间\n MaxAutoRetries: 1 # 重试策略先尝试访问首选实例一次,失败后才会更换实例访问\n MaxAutoRetriesNextServer: 2 # 更换实例访问的次数:通过参数设置为2, 所以会尝试更换2次实例进行重试\n OkToRetryOnAllOperations: true # 开启对请求进行行重试\n\nmanagement:\n endpoints:\n web:\n exposure:\n include: \'health\'\n endpoint:\n health:\n show-details: always\n', 'de451d96d9134835784db63cfc88734c', '2022-08-18 10:22:04', '2022-08-18 10:22:05', 'nacos', '127.0.0.1', 'U', 'test');
-- ----------------------------
-- Table structure for permissions
diff --git a/db/zyjblogs_rbac.sql b/db/zyjblogs_rbac.sql
index 5b534b6..a7c0a28 100644
--- a/db/zyjblogs_rbac.sql
+++ b/db/zyjblogs_rbac.sql
@@ -11,104 +11,128 @@
Target Server Version : 50732
File Encoding : 65001
- Date: 17/08/2022 18:14:29
+ Date: 18/08/2022 18:47:42
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
---
--- Oauth sql -- MYSQL
---
-Drop table if exists oauth_client_details;
-create table oauth_client_details (
- client_id VARCHAR(255) PRIMARY KEY,
- resource_ids VARCHAR(255),
- client_secret VARCHAR(255),
- scope VARCHAR(255),
- authorized_grant_types VARCHAR(255),
- web_server_redirect_uri VARCHAR(255),
- authorities VARCHAR(255),
- access_token_validity INTEGER,
- refresh_token_validity INTEGER,
- additional_information TEXT,
- create_time timestamp default now(),
- archived tinyint(1) default '0',
- trusted tinyint(1) default '0',
- autoapprove VARCHAR (255) default 'false'
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+-- ----------------------------
+-- Table structure for oauth_access_token
+-- ----------------------------
+DROP TABLE IF EXISTS `oauth_access_token`;
+CREATE TABLE `oauth_access_token` (
+ `create_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
+ `token_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `token` blob NULL,
+ `authentication_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `user_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `client_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `authentication` blob NULL,
+ `refresh_token` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ UNIQUE INDEX `authentication_id`(`authentication_id`) USING BTREE,
+ INDEX `token_id_index`(`token_id`) USING BTREE,
+ INDEX `authentication_id_index`(`authentication_id`) USING BTREE,
+ INDEX `user_name_index`(`user_name`) USING BTREE,
+ INDEX `client_id_index`(`client_id`) USING BTREE,
+ INDEX `refresh_token_index`(`refresh_token`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+-- ----------------------------
+-- Records of oauth_access_token
+-- ----------------------------
-Drop table if exists oauth_access_token;
-create table oauth_access_token (
- create_time timestamp default now(),
- token_id VARCHAR(255),
- token BLOB,
- authentication_id VARCHAR(255) UNIQUE,
- user_name VARCHAR(255),
- client_id VARCHAR(255),
- authentication BLOB,
- refresh_token VARCHAR(255)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+-- ----------------------------
+-- Table structure for oauth_client_details
+-- ----------------------------
+DROP TABLE IF EXISTS `oauth_client_details`;
+CREATE TABLE `oauth_client_details` (
+ `client_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+ `resource_ids` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `client_secret` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `scope` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `authorized_grant_types` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `web_server_redirect_uri` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `authorities` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `access_token_validity` int(11) NULL DEFAULT NULL,
+ `refresh_token_validity` int(11) NULL DEFAULT NULL,
+ `additional_information` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
+ `create_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
+ `archived` tinyint(1) NULL DEFAULT 0,
+ `trusted` tinyint(1) NULL DEFAULT 0,
+ `autoapprove` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'false',
+ PRIMARY KEY (`client_id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+-- ----------------------------
+-- Records of oauth_client_details
+-- ----------------------------
+INSERT INTO `oauth_client_details` VALUES ('zyjblogs-gateway', 'zyjblogs-gateway', '$2a$10$Wk2w4OX5DpFgG3rBuhPnnulCSOIuU3TZhpWjaOq39LZnL.p0LJila', 'all', 'authorization_code,password,client_credentials,implicit,refresh_token', 'http://localhost:9019/', NULL, NULL, NULL, NULL, '2022-08-18 14:13:53', 0, 0, 'false');
+INSERT INTO `oauth_client_details` VALUES ('zyjblogs-oauth', 'zyjblogs-oauth', '$2a$10$Wk2w4OX5DpFgG3rBuhPnnulCSOIuU3TZhpWjaOq39LZnL.p0LJila', 'all', 'authorization_code,password,client_credentials,implicit,refresh_token', 'http://localhost:9019/', NULL, NULL, NULL, NULL, '2022-08-18 14:14:32', 0, 0, 'false');
+INSERT INTO `oauth_client_details` VALUES ('zyjblogs-rbac', 'zyjblogs-rbac', '$2a$10$Wk2w4OX5DpFgG3rBuhPnnulCSOIuU3TZhpWjaOq39LZnL.p0LJila', 'all', 'authorization_code,password,client_credentials,implicit,refresh_token', 'http://localhost:9029/', NULL, NULL, NULL, NULL, '2022-08-18 08:34:24', 0, 0, 'false');
-Drop table if exists oauth_refresh_token;
-create table oauth_refresh_token (
- create_time timestamp default now(),
- token_id VARCHAR(255),
- token BLOB,
- authentication BLOB
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+-- ----------------------------
+-- Table structure for oauth_code
+-- ----------------------------
+DROP TABLE IF EXISTS `oauth_code`;
+CREATE TABLE `oauth_code` (
+ `create_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
+ `code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `authentication` blob NULL,
+ INDEX `code_index`(`code`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+-- ----------------------------
+-- Records of oauth_code
+-- ----------------------------
+INSERT INTO `oauth_code` VALUES ('2022-08-18 09:01:55', 'AeocBw', 0xACED0005737200416F72672E737072696E676672616D65776F726B2E73656375726974792E6F61757468322E70726F76696465722E4F417574683241757468656E7469636174696F6EBD400B02166252130200024C000D73746F7265645265717565737474003C4C6F72672F737072696E676672616D65776F726B2F73656375726974792F6F61757468322F70726F76696465722F4F4175746832526571756573743B4C00127573657241757468656E7469636174696F6E7400324C6F72672F737072696E676672616D65776F726B2F73656375726974792F636F72652F41757468656E7469636174696F6E3B787200476F72672E737072696E676672616D65776F726B2E73656375726974792E61757468656E7469636174696F6E2E416273747261637441757468656E7469636174696F6E546F6B656ED3AA287E6E47640E0200035A000D61757468656E746963617465644C000B617574686F7269746965737400164C6A6176612F7574696C2F436F6C6C656374696F6E3B4C000764657461696C737400124C6A6176612F6C616E672F4F626A6563743B787000737200266A6176612E7574696C2E436F6C6C656374696F6E7324556E6D6F6469666961626C654C697374FC0F2531B5EC8E100200014C00046C6973747400104C6A6176612F7574696C2F4C6973743B7872002C6A6176612E7574696C2E436F6C6C656374696F6E7324556E6D6F6469666961626C65436F6C6C656374696F6E19420080CB5EF71E0200014C00016371007E00047870737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A657870000000007704000000007871007E000C707372003A6F72672E737072696E676672616D65776F726B2E73656375726974792E6F61757468322E70726F76696465722E4F41757468325265717565737400000000000000010200075A0008617070726F7665644C000B617574686F72697469657371007E00044C000A657874656E73696F6E7374000F4C6A6176612F7574696C2F4D61703B4C000B72656469726563745572697400124C6A6176612F6C616E672F537472696E673B4C00077265667265736874003B4C6F72672F737072696E676672616D65776F726B2F73656375726974792F6F61757468322F70726F76696465722F546F6B656E526571756573743B4C000B7265736F7572636549647374000F4C6A6176612F7574696C2F5365743B4C000D726573706F6E7365547970657371007E0011787200386F72672E737072696E676672616D65776F726B2E73656375726974792E6F61757468322E70726F76696465722E426173655265717565737436287A3EA37169BD0200034C0008636C69656E74496471007E000F4C001172657175657374506172616D657465727371007E000E4C000573636F706571007E0011787074000D7A796A626C6F67732D72626163737200256A6176612E7574696C2E436F6C6C656374696F6E7324556E6D6F6469666961626C654D6170F1A5A8FE74F507420200014C00016D71007E000E7870737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F400000000000067708000000080000000474000D726573706F6E73655F74797065740004636F6465740009636C69656E745F696471007E001474000C72656469726563745F75726C74001568747470733A2F2F7777772E62616964752E636F6D74000573636F7065740003616C6C78737200256A6176612E7574696C2E436F6C6C656374696F6E7324556E6D6F6469666961626C65536574801D92D18F9B80550200007871007E0009737200176A6176612E7574696C2E4C696E6B656448617368536574D86CD75A95DD2A1E020000787200116A6176612E7574696C2E48617368536574BA44859596B8B7340300007870770C000000103F4000000000000171007E001F78017371007E0023770C000000103F40000000000000787371007E00173F400000000000007708000000100000000078740016687474703A2F2F6C6F63616C686F73743A393032392F707371007E0023770C000000103F4000000000000174000D7A796A626C6F67732D72626163787371007E0023770C000000103F4000000000000171007E001A787372004F6F72672E737072696E676672616D65776F726B2E73656375726974792E61757468656E7469636174696F6E2E557365726E616D6550617373776F726441757468656E7469636174696F6E546F6B656E00000000000002120200024C000B63726564656E7469616C7371007E00054C00097072696E636970616C71007E00057871007E0003017372001F6A6176612E7574696C2E436F6C6C656374696F6E7324456D7074794C6973747AB817B43CA79EDE0200007870737200486F72672E737072696E676672616D65776F726B2E73656375726974792E7765622E61757468656E7469636174696F6E2E57656241757468656E7469636174696F6E44657461696C7300000000000002120200024C000D72656D6F74654164647265737371007E000F4C000973657373696F6E496471007E000F78707400093132372E302E302E3174002038373032444535373930443133444133363839453433354436434139444143367073720031636E2E7A796A626C6F67732E6F617574682E7365727665722E757365722E706F2E4F617574685573657244657461696C739ABCC249D9EA599302000E5A00116163636F756E744E6F6E457870697265645A00106163636F756E744E6F6E4C6F636B65645A001563726564656E7469616C734E6F6E457870697265645A0007656E61626C65644C000B617574686F72697469657371007E00044C000764656C657465647400134C6A6176612F6C616E672F496E74656765723B4C0005656D61696C71007E000F4C0002696471007E000F4C000C696E7669746555736572496471007E000F4C00046E616D6571007E000F4C000870617373776F726471007E000F4C000570686F6E6571007E00344C000673746174757371007E00344C0008757365726E616D6571007E000F78700101010170737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000070740001317074000561646D696E74003C2432612431302434446C66765A7271377A674B7A6B624B79672E47484F36794864476E6F7A6361663342354A53414330664E42346B3147684D6B36797071007E003874000561646D696E);
-Drop table if exists oauth_code;
-create table oauth_code (
- create_time timestamp default now(),
- code VARCHAR(255),
- authentication BLOB
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+-- ----------------------------
+-- Table structure for oauth_refresh_token
+-- ----------------------------
+DROP TABLE IF EXISTS `oauth_refresh_token`;
+CREATE TABLE `oauth_refresh_token` (
+ `create_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
+ `token_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
+ `token` blob NULL,
+ `authentication` blob NULL,
+ INDEX `token_id_index`(`token_id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+-- ----------------------------
+-- Records of oauth_refresh_token
+-- ----------------------------
-
--- Add indexes
-create index token_id_index on oauth_access_token (token_id);
-create index authentication_id_index on oauth_access_token (authentication_id);
-create index user_name_index on oauth_access_token (user_name);
-create index client_id_index on oauth_access_token (client_id);
-create index refresh_token_index on oauth_access_token (refresh_token);
-
-create index token_id_index on oauth_refresh_token (token_id);
-
-create index code_index on oauth_code (code);
-
-
-INSERT INTO zyjblogs_rbac.oauth_client_details
-(client_id, resource_ids, client_secret, `scope`, authorized_grant_types, web_server_redirect_uri, authorities, access_token_validity, refresh_token_validity, additional_information, autoapprove, trusted, archived)
-VALUES('zyjblogs-rbac', 'zyjblogs-rbac', '$2a$10$Wk2w4OX5DpFgG3rBuhPnnulCSOIuU3TZhpWjaOq39LZnL.p0LJila', 'all', 'authorization_code,password,client_credentials,implicit,refresh_token', NULL, NULL, NULL, NULL, NULL, 'false', NULL, NULL);
-
--- zyjblogs_rbac.`user` definition
+-- ----------------------------
+-- Table structure for user
+-- ----------------------------
DROP TABLE IF EXISTS `user`;
-CREATE TABLE `user` (
- `id` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8_general_ci NOT NULL COMMENT '用户id',
- `username` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8_general_ci NOT NULL COMMENT '用户名',
- `name` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8_general_ci DEFAULT NULL COMMENT '昵称',
- `age` int DEFAULT NULL COMMENT '用户年龄',
- `avatar` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8_general_ci DEFAULT NULL COMMENT '头像',
- `password` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8_general_ci DEFAULT NULL COMMENT '用户密码',
- `phone` int DEFAULT NULL COMMENT '用户密码',
- `email` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8_general_ci DEFAULT NULL COMMENT '邮箱',
- `invite_user_id` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8_general_ci DEFAULT NULL COMMENT '邀请者id',
- `status` int DEFAULT NULL COMMENT '用户状态 1启用 0注销',
- `follow_num` int DEFAULT NULL COMMENT '关注数量',
- `fans_num` int DEFAULT NULL COMMENT '粉丝数量',
- `deleted` tinyint DEFAULT '0',
- `description` varchar(600) CHARACTER SET utf8mb3 COLLATE utf8_general_ci DEFAULT NULL COMMENT '用户介绍',
- `create_user_id` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8_general_ci DEFAULT NULL COMMENT '创建用户id',
- `create_time` datetime DEFAULT NULL COMMENT '创建时间',
- `update_user_id` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8_general_ci DEFAULT NULL COMMENT '更新用户id',
- `update_time` datetime DEFAULT NULL COMMENT '更新时间',
- PRIMARY KEY (`id`) USING BTREE,
- UNIQUE KEY `username` (`username`) USING BTREE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;
+CREATE TABLE `user` (
+ `id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户id',
+ `username` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户名',
+ `name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '昵称',
+ `age` int(11) NULL DEFAULT NULL COMMENT '用户年龄',
+ `avatar` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '头像',
+ `password` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户密码',
+ `phone` int(11) NULL DEFAULT NULL COMMENT '用户密码',
+ `email` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '邮箱',
+ `invite_user_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '邀请者id',
+ `status` int(11) NULL DEFAULT NULL COMMENT '用户状态 1启用 0注销',
+ `follow_num` int(11) NULL DEFAULT NULL COMMENT '关注数量',
+ `fans_num` int(11) NULL DEFAULT NULL COMMENT '粉丝数量',
+ `deleted` tinyint(4) NULL DEFAULT 0,
+ `description` varchar(600) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户介绍',
+ `create_user_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建用户id',
+ `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
+ `update_user_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新用户id',
+ `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
+ PRIMARY KEY (`id`) USING BTREE,
+ UNIQUE INDEX `username`(`username`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;
+
+-- ----------------------------
+-- Records of user
+-- ----------------------------
+INSERT INTO `user` VALUES ('1', 'admin', 'admin', 1, NULL, '$2a$10$4DlfvZrq7zgKzkbKyg.GHO6yHdGnozcaf3B5JSAC0fNB4k1GhMk6y', NULL, NULL, NULL, 0, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL);
SET FOREIGN_KEY_CHECKS = 1;
diff --git a/pom.xml b/pom.xml
index 7d2ddbf..e887f6a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -17,16 +17,19 @@
zyjblogs-oauth
zyjblogs-rbac
zyjblogs-gateway
+ zyjblogs-common-spring-boot-starter
+ 1.0-SNAPSHOT
11
11
Hoxton.SR12
1.18.24
2.13.3
- 0.11.1
+ 0.9.1
+ 0.11.1
4.5.0
0.3.1
11.8
@@ -37,6 +40,23 @@
8.0.21
2.2.6.RELEASE
+ 2.12.2
+
+ 1.5.4
+
+ 1.5.24
+ 3.0.3
+
+ 2.2.11
+
+ 2.3.0
+
+ 1.18.24
+ 3.12.0
+ 4.4
+ 2.11.0
+ 1.1.0
+ 2.13.3
@@ -74,17 +94,22 @@
io.jsonwebtoken
jjwt-api
- ${jjwt.version}
+ ${jwt.version}
io.jsonwebtoken
jjwt-impl
+ ${jwt.version}
+
+
+ io.jsonwebtoken
+ jjwt
${jjwt.version}
io.jsonwebtoken
jjwt-jackson
- ${jjwt.version}
+ ${jwt.version}
com.aliyun
@@ -106,6 +131,11 @@
nacos-client
${nacos-client.version}
+
+ com.fasterxml.jackson.datatype
+ jackson-datatype-jsr310
+ ${jackson-datatype-jsr310.version}
+
com.alibaba
@@ -122,7 +152,56 @@
commons-pool2
2.7.0
-
+
+ com.alibaba
+ transmittable-thread-local
+ ${com.alibaba.transmittable.version}
+
+
+ ma.glasnost.orika
+ orika-core
+ ${orika-core.version}
+
+
+ io.swagger
+ swagger-annotations
+ ${swagger-annotations.verion}
+
+
+ com.github.xiaoymin
+ knife4j-spring-boot-starter
+ ${knife4j-spring-boot-starter.version}
+
+
+ com.alibaba
+ easyexcel
+ ${easyexcel.version}
+
+
+ org.apache.commons
+ commons-lang3
+ ${commons-lang3.version}
+
+
+ org.apache.commons
+ commons-collections4
+ ${commons-collections4.version}
+
+
+ commons-io
+ commons-io
+ ${commons-io.version}
+
+
+ org.apache.commons
+ commons-crypto
+ ${commons-crypto.version}
+
+
+ ma.glasnost.orika
+ orika-core
+ ${orika-core.version}
+
@@ -130,6 +209,7 @@
+
@@ -137,10 +217,10 @@
-
- org.springframework.boot
- spring-boot-devtools
-
+
+
+
+
org.projectlombok
lombok
diff --git a/zyjblogs-common-spring-boot-starter/pom.xml b/zyjblogs-common-spring-boot-starter/pom.xml
new file mode 100644
index 0000000..b5a819f
--- /dev/null
+++ b/zyjblogs-common-spring-boot-starter/pom.xml
@@ -0,0 +1,78 @@
+
+
+
+ zyjblogs-parent
+ cn.zyjblogs
+ 1.0-SNAPSHOT
+
+ 4.0.0
+ cn.zyjblogs.starter
+ zyjblogs-common-spring-boot-starter
+ ${zyjblogs.version}
+
+ 11
+ 11
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-validation
+
+
+ io.swagger
+ swagger-annotations
+
+
+ com.alibaba
+ transmittable-thread-local
+
+
+
+ org.projectlombok
+ lombok
+
+
+ org.apache.commons
+ commons-lang3
+
+
+ org.apache.commons
+ commons-collections4
+
+
+ commons-io
+ commons-io
+
+
+ org.apache.commons
+ commons-crypto
+
+
+ ma.glasnost.orika
+ orika-core
+
+
+ com.alibaba
+ easyexcel
+
+
+ io.jsonwebtoken
+ jjwt
+
+
+ javax.xml.bind
+ jaxb-api
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+
+
+
+
\ No newline at end of file
diff --git a/zyjblogs-common-spring-boot-starter/src/main/java/cn/zyjblogs/common/entity/constant/CommonConstant.java b/zyjblogs-common-spring-boot-starter/src/main/java/cn/zyjblogs/common/entity/constant/CommonConstant.java
new file mode 100644
index 0000000..40096f6
--- /dev/null
+++ b/zyjblogs-common-spring-boot-starter/src/main/java/cn/zyjblogs/common/entity/constant/CommonConstant.java
@@ -0,0 +1,21 @@
+package cn.zyjblogs.common.entity.constant;
+
+public class CommonConstant {
+ public static final Integer IS_DELETED = 1;
+ public static final Integer NO_DELETED = 0 ;
+ public static final int YES = 1;
+ public static final int NO = 0;
+ public static final String NO_STR = "0";
+ public static final int VERSION_START_VALUE = 1;
+ public static final String TENANT_ID = "tenant_id";
+ public static final String EMPTY_STR = "";
+ public static final int DEFAULT_PAGE = 1;
+ public static final int DEFAULT_LIMIT = 10;
+ public static final String DATETIME_PATTERN = "yyyy-MM-dd HH:mm:ss";
+ public static final String TRACE_ID_HEADER = "x-traceId-header";
+ public static final String LOG_TRACE_ID = "traceId";
+ public static final String INIT_TENANT_FANOUT_EXCHANGE = "init.tenant.fanout.exchange";
+
+ private CommonConstant() {
+ }
+}
\ No newline at end of file
diff --git a/zyjblogs-common-spring-boot-starter/src/main/java/cn/zyjblogs/common/entity/constant/HttpHeaderConstant.java b/zyjblogs-common-spring-boot-starter/src/main/java/cn/zyjblogs/common/entity/constant/HttpHeaderConstant.java
new file mode 100644
index 0000000..8a81afe
--- /dev/null
+++ b/zyjblogs-common-spring-boot-starter/src/main/java/cn/zyjblogs/common/entity/constant/HttpHeaderConstant.java
@@ -0,0 +1,14 @@
+package cn.zyjblogs.common.entity.constant;
+
+public class HttpHeaderConstant {
+ public static final String AUTHORIZATION = "Authorization";
+ public static final String AUTHORIZATION_TYPE = "Bearer";
+ public static final String LANGUAGE = "istorm-language";
+ public static final String REQUEST_FROM_GATEWAY_KEY = "request-from-istorm-gateway";
+ public static final String REQUEST_FROM_GATEWAY_VALUE = "yes";
+ public static final String REQUEST_FROM_FEIGN_KEY = "request-from-istorm-feign";
+ public static final String REQUEST_FROM_FEIGN_VALUE = "yes";
+
+ private HttpHeaderConstant() {
+ }
+}
diff --git a/zyjblogs-common-spring-boot-starter/src/main/java/cn/zyjblogs/common/entity/constant/LengthConstant.java b/zyjblogs-common-spring-boot-starter/src/main/java/cn/zyjblogs/common/entity/constant/LengthConstant.java
new file mode 100644
index 0000000..274fabb
--- /dev/null
+++ b/zyjblogs-common-spring-boot-starter/src/main/java/cn/zyjblogs/common/entity/constant/LengthConstant.java
@@ -0,0 +1,13 @@
+package cn.zyjblogs.common.entity.constant;
+
+public class LengthConstant {
+ public static final int ID_SIZE = 32;
+ public static final int MIN_SIZE = 1;
+ public static final int SHORT_SIZE = 16;
+ public static final int NORMAL_SIZE = 100;
+ public static final int LONG_SIZE = 500;
+ public static final int MOBILE_PHONE_SIZE = 11;
+
+ public LengthConstant() {
+ }
+}
diff --git a/zyjblogs-common-spring-boot-starter/src/main/java/cn/zyjblogs/common/entity/constant/RegexConstant.java b/zyjblogs-common-spring-boot-starter/src/main/java/cn/zyjblogs/common/entity/constant/RegexConstant.java
new file mode 100644
index 0000000..0018462
--- /dev/null
+++ b/zyjblogs-common-spring-boot-starter/src/main/java/cn/zyjblogs/common/entity/constant/RegexConstant.java
@@ -0,0 +1,11 @@
+package cn.zyjblogs.common.entity.constant;
+
+public class RegexConstant {
+ public static final String MOBILE_PHONE_PATTERN = "[\\s]?|^1[3456789]\\d{9}$";
+ public static final String IS_ENABLED_PATTERN = "^(0|1)$";
+ public static final String INVALID_CHAR = "[a-zA-Z0-9\\-_\\u4e00-\\u9fa5\\s]+";
+ public static final String EMAIL = "^(\\w-*\\.*)+@(\\w-?)+(\\.\\w{2,})+$";
+
+ public RegexConstant() {
+ }
+}
diff --git a/zyjblogs-common-spring-boot-starter/src/main/java/cn/zyjblogs/common/entity/context/BaseContextHandler.java b/zyjblogs-common-spring-boot-starter/src/main/java/cn/zyjblogs/common/entity/context/BaseContextHandler.java
new file mode 100644
index 0000000..6f7b9cb
--- /dev/null
+++ b/zyjblogs-common-spring-boot-starter/src/main/java/cn/zyjblogs/common/entity/context/BaseContextHandler.java
@@ -0,0 +1,58 @@
+package cn.zyjblogs.common.entity.context;
+
+import cn.zyjblogs.common.entity.dto.ContextDto;
+import cn.zyjblogs.common.utils.bean.BeanUtils;
+import com.alibaba.ttl.TransmittableThreadLocal;
+
+import java.util.Locale;
+
+public class BaseContextHandler {
+ private static final ThreadLocal CONTEXT = new TransmittableThreadLocal() {
+ public ContextDto initialValue() {
+ return ContextDto.builder().build();
+ }
+ };
+
+ public BaseContextHandler() {
+ }
+
+ public static ContextDto get() {
+ return (ContextDto)CONTEXT.get();
+ }
+
+ public static void set(ContextDto ContextDto) {
+ CONTEXT.set(ContextDto);
+ }
+
+ public static String getUserId() {
+ return ((ContextDto)CONTEXT.get()).getUserId();
+ }
+
+ public static String getUsername() {
+ return ((ContextDto)CONTEXT.get()).getUsername();
+ }
+
+ public static Integer getSource() {
+ return ((ContextDto)CONTEXT.get()).getSource();
+ }
+
+ public static String getTenantId() {
+ return ((ContextDto)CONTEXT.get()).getTenantId();
+ }
+
+ public static String getToken() {
+ return ((ContextDto)CONTEXT.get()).getToken();
+ }
+
+ public static ContextDto getDataReplication() {
+ return (ContextDto) BeanUtils.map((ContextDto)CONTEXT.get(), ContextDto.class);
+ }
+
+ public static Locale getLanguage() {
+ return ((ContextDto)CONTEXT.get()).getLanguage();
+ }
+
+ public static void clear() {
+ CONTEXT.remove();
+ }
+}
diff --git a/zyjblogs-common-spring-boot-starter/src/main/java/cn/zyjblogs/common/entity/dto/ContextDto.java b/zyjblogs-common-spring-boot-starter/src/main/java/cn/zyjblogs/common/entity/dto/ContextDto.java
new file mode 100644
index 0000000..43b0ffc
--- /dev/null
+++ b/zyjblogs-common-spring-boot-starter/src/main/java/cn/zyjblogs/common/entity/dto/ContextDto.java
@@ -0,0 +1,21 @@
+package cn.zyjblogs.common.entity.dto;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.Locale;
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+public class ContextDto {
+ private String tenantId;
+ private String userId;
+ private String username;
+ private Integer source;
+ private Integer isTenantCreator;
+ private String token;
+ private Locale language;
+}
\ No newline at end of file
diff --git a/zyjblogs-common-spring-boot-starter/src/main/java/cn/zyjblogs/common/entity/response/ResponseObject.java b/zyjblogs-common-spring-boot-starter/src/main/java/cn/zyjblogs/common/entity/response/ResponseObject.java
new file mode 100644
index 0000000..fe99553
--- /dev/null
+++ b/zyjblogs-common-spring-boot-starter/src/main/java/cn/zyjblogs/common/entity/response/ResponseObject.java
@@ -0,0 +1,50 @@
+//
+// Source code recreated from a .class file by IntelliJ IDEA
+// (powered by FernFlower decompiler)
+//
+
+package cn.zyjblogs.common.entity.response;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@ApiModel(
+ description = "状态返回信息"
+)
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+public class ResponseObject {
+ @ApiModelProperty(
+ value = "响应结果编码",
+ example = "200"
+ )
+ private int code;
+ @ApiModelProperty(
+ value = "错误码",
+ example = "user_not_exists"
+ )
+ private String errorCode;
+ @ApiModelProperty(
+ value = "响应结果信息",
+ example = "请求成功"
+ )
+ private String msg;
+ @ApiModelProperty(
+ value = "统计列表总数(如果列表存在)",
+ example = "10"
+ )
+ private long count;
+ @ApiModelProperty("响应结果数据")
+ private T data;
+ @ApiModelProperty(
+ value = "当前时间戳",
+ example = "1630051102895"
+ )
+ private long timestamp;
+}
diff --git a/zyjblogs-common-spring-boot-starter/src/main/java/cn/zyjblogs/common/entity/response/ResponseResult.java b/zyjblogs-common-spring-boot-starter/src/main/java/cn/zyjblogs/common/entity/response/ResponseResult.java
new file mode 100644
index 0000000..4103e27
--- /dev/null
+++ b/zyjblogs-common-spring-boot-starter/src/main/java/cn/zyjblogs/common/entity/response/ResponseResult.java
@@ -0,0 +1,44 @@
+//
+// Source code recreated from a .class file by IntelliJ IDEA
+// (powered by FernFlower decompiler)
+//
+
+package cn.zyjblogs.common.entity.response;
+
+public class ResponseResult {
+ private static final int ZERO_DATA_TOTAL = 0;
+ private static final int ONE_DATA_TOTAL = 1;
+
+ private ResponseResult() {
+ }
+
+ public static ResponseObject