From 5496779c815a3f4fd61038dfb3aba72340691171 Mon Sep 17 00:00:00 2001 From: Hamm Date: Sun, 7 Jul 2024 00:40:39 +0800 Subject: [PATCH 1/2] =?UTF-8?q?docs(=E6=B3=A8=E9=87=8A):=20=E6=A0=87?= =?UTF-8?q?=E8=AE=B0=E4=BB=A3=E7=A0=81=E4=B8=AD=E7=9A=84=E5=85=B3=E9=94=AE?= =?UTF-8?q?=E5=AD=97=E4=BB=A5=E6=8F=90=E9=AB=98=E5=8F=AF=E8=AF=BB=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 通过在代码注释和文档中使用标记,增强了关键字的可视性和可读性。这会帮助 开发者更容易地识别和理解代码中的关键概念和变量名。 Signed-off-by: Hamm --- .../cn/hamm/airpower/AbstractWebConfig.java | 8 +- .../airpower/annotation/ApiController.java | 2 +- .../cn/hamm/airpower/annotation/ReadOnly.java | 2 +- .../cn/hamm/airpower/annotation/Search.java | 2 +- .../hamm/airpower/auto/RedisConfigurer.java | 4 +- .../java/cn/hamm/airpower/config/Configs.java | 8 +- .../cn/hamm/airpower/config/Constant.java | 90 +++++------ .../cn/hamm/airpower/config/CookieConfig.java | 12 +- .../cn/hamm/airpower/config/MqttConfig.java | 2 +- .../hamm/airpower/config/ServiceConfig.java | 12 +- .../hamm/airpower/config/WebSocketConfig.java | 12 +- .../cn/hamm/airpower/enums/ContentType.java | 12 +- .../cn/hamm/airpower/enums/HttpMethod.java | 10 +- .../AbstractRequestInterceptor.java | 4 +- .../interceptor/ExceptionInterceptor.java | 4 +- .../hamm/airpower/interfaces/IDictionary.java | 12 +- .../cn/hamm/airpower/interfaces/IEntity.java | 8 +- .../airpower/interfaces/IEntityAction.java | 2 +- .../cn/hamm/airpower/interfaces/IFile.java | 8 +- .../hamm/airpower/interfaces/IFunction.java | 2 +- .../cn/hamm/airpower/interfaces/ITree.java | 24 +-- .../java/cn/hamm/airpower/model/Json.java | 50 +++--- .../java/cn/hamm/airpower/open/IOpenApp.java | 8 +- .../hamm/airpower/open/IOpenAppService.java | 6 +- .../hamm/airpower/open/IOpenLogService.java | 4 +- .../java/cn/hamm/airpower/open/OpenApi.java | 2 +- .../cn/hamm/airpower/open/OpenApiAspect.java | 18 +-- .../airpower/open/OpenArithmeticType.java | 4 +- .../cn/hamm/airpower/open/OpenBaseModel.java | 2 +- .../cn/hamm/airpower/open/OpenRequest.java | 4 +- .../cn/hamm/airpower/open/OpenResponse.java | 2 +- .../airpower/resolver/AccessResolver.java | 2 +- .../cn/hamm/airpower/root/RootController.java | 2 +- .../cn/hamm/airpower/root/RootEntity.java | 16 +- .../airpower/root/RootEntityController.java | 34 ++-- .../cn/hamm/airpower/root/RootService.java | 153 +++++++++--------- .../java/cn/hamm/airpower/util/AesUtil.java | 14 +- .../cn/hamm/airpower/util/CollectionUtil.java | 2 +- .../cn/hamm/airpower/util/CookieUtil.java | 10 +- .../cn/hamm/airpower/util/DictionaryUtil.java | 4 +- .../java/cn/hamm/airpower/util/HttpUtil.java | 28 ++-- .../java/cn/hamm/airpower/util/MqttUtil.java | 8 +- .../cn/hamm/airpower/util/PasswordUtil.java | 2 +- .../java/cn/hamm/airpower/util/RedisUtil.java | 24 +-- .../cn/hamm/airpower/util/ReflectUtil.java | 12 +- .../java/cn/hamm/airpower/util/RsaUtil.java | 24 +-- .../cn/hamm/airpower/util/SecurityUtil.java | 10 +- .../cn/hamm/airpower/util/StringUtil.java | 14 +- .../java/cn/hamm/airpower/util/TaskUtil.java | 4 +- .../java/cn/hamm/airpower/util/TokenUtil.java | 36 ++--- .../java/cn/hamm/airpower/util/TreeUtil.java | 2 +- .../java/cn/hamm/airpower/util/Utils.java | 16 +- .../cn/hamm/airpower/util/ValidateUtil.java | 4 +- .../airpower/websocket/WebSocketEvent.java | 42 ++--- .../airpower/websocket/WebSocketHandler.java | 54 +++---- .../airpower/websocket/WebSocketPayload.java | 2 +- .../airpower/websocket/WebSocketSupport.java | 6 +- .../airpower/websocket/WebsocketUtil.java | 2 +- 58 files changed, 433 insertions(+), 434 deletions(-) diff --git a/airpower-core/src/main/java/cn/hamm/airpower/AbstractWebConfig.java b/airpower-core/src/main/java/cn/hamm/airpower/AbstractWebConfig.java index b1f0a08..b7a3301 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/AbstractWebConfig.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/AbstractWebConfig.java @@ -48,9 +48,9 @@ public abstract class AbstractWebConfig implements WebMvcConfigurer, WebSocketCo public abstract AbstractRequestInterceptor getAccessInterceptor(); /** - *

获取一个WebSocketHandler

+ *

获取一个 WebSocketHandler

* - * @return WebSocketHandler + * @return WebSocketHandler */ @Bean public WebSocketHandler getWebsocketHandler() { @@ -103,9 +103,9 @@ public abstract class AbstractWebConfig implements WebMvcConfigurer, WebSocketCo } /** - *

添加WebSocket服务监听

+ *

添加 WebSocket 服务监听

* - * @param registry WebSocketHandlerRegistry + * @param registry WebSocketHandlerRegistry */ @Override public final void registerWebSocketHandlers(@NotNull WebSocketHandlerRegistry registry) { diff --git a/airpower-core/src/main/java/cn/hamm/airpower/annotation/ApiController.java b/airpower-core/src/main/java/cn/hamm/airpower/annotation/ApiController.java index d6b6752..fa9e438 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/annotation/ApiController.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/annotation/ApiController.java @@ -7,7 +7,7 @@ import org.springframework.web.bind.annotation.RestController; import java.lang.annotation.*; /** - *

API控制器

+ *

API 控制器

* * @author Hamm.cn */ diff --git a/airpower-core/src/main/java/cn/hamm/airpower/annotation/ReadOnly.java b/airpower-core/src/main/java/cn/hamm/airpower/annotation/ReadOnly.java index c494026..78b19e7 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/annotation/ReadOnly.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/annotation/ReadOnly.java @@ -8,7 +8,7 @@ import java.lang.annotation.*; *

只读字段

* * @author Hamm.cn - * @apiNote 可在控制器调用Service前先调用 {@link RootModel#ignoreReadOnlyFields()} } 将标记了此注解的字段移除 + * @apiNote 可在控制器调用 Service 前先调用 {@link RootModel#ignoreReadOnlyFields()} } 将标记了此注解的字段移除 */ @Target(ElementType.FIELD) @Retention(RetentionPolicy.RUNTIME) diff --git a/airpower-core/src/main/java/cn/hamm/airpower/annotation/Search.java b/airpower-core/src/main/java/cn/hamm/airpower/annotation/Search.java index 96a23c0..14109fe 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/annotation/Search.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/annotation/Search.java @@ -32,7 +32,7 @@ public @interface Search { LIKE, /** - *

JOIN查询

+ *

JOIN 查询

*/ JOIN, } diff --git a/airpower-core/src/main/java/cn/hamm/airpower/auto/RedisConfigurer.java b/airpower-core/src/main/java/cn/hamm/airpower/auto/RedisConfigurer.java index be89e62..85fe7e7 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/auto/RedisConfigurer.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/auto/RedisConfigurer.java @@ -20,7 +20,7 @@ import java.time.Duration; import java.util.Objects; /** - *

Redis配置

+ *

Redis 配置

* * @author Hamm.cn */ @@ -28,7 +28,7 @@ import java.util.Objects; @EnableCaching public class RedisConfigurer implements CachingConfigurer { /** - *

Redis连接工厂

+ *

Redis 连接工厂

*/ @Resource private RedisConnectionFactory redisConnectionFactory; diff --git a/airpower-core/src/main/java/cn/hamm/airpower/config/Configs.java b/airpower-core/src/main/java/cn/hamm/airpower/config/Configs.java index 629f249..15082b7 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/config/Configs.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/config/Configs.java @@ -5,14 +5,14 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; /** - *

AirPower配置

+ *

AirPower 配置

* * @author Hamm.cn */ @Component public class Configs { /** - *

全局Cookie配置

+ *

全局 Cookie 配置

*/ @Getter private static CookieConfig cookieConfig; @@ -24,13 +24,13 @@ public class Configs { private static ServiceConfig serviceConfig; /** - *

MQTT配置

+ *

MQTT 配置

*/ @Getter private static MqttConfig mqttConfig; /** - *

WebSocket配置

+ *

WebSocket 配置

*/ @Getter private static WebSocketConfig websocketConfig; diff --git a/airpower-core/src/main/java/cn/hamm/airpower/config/Constant.java b/airpower-core/src/main/java/cn/hamm/airpower/config/Constant.java index 8babbe7..5090f56 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/config/Constant.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/config/Constant.java @@ -9,37 +9,37 @@ import org.springframework.http.HttpStatus; */ public class Constant { /** - *

AirPower

+ *

AirPower

*/ public static final String AIRPOWER = "airpower"; /** - *

创建时间字段名

+ *

创建时间字段名 createTime

*/ public static final String CREATE_TIME_FIELD = "createTime"; /** - *

修改时间字段名

+ *

修改时间字段名 updateTime

*/ public static final String UPDATE_TIME_FIELD = "updateTime"; /** - *

主键ID字段名

+ *

主键 ID 字段名

*/ public static final String ID = "id"; /** - *

一分钟

+ *

一分钟 60

*/ public static final int SECOND_PER_MINUTE = 60; /** - *

一天24小时

+ *

一天 24 小时

*/ public static final int HOUR_PER_DAY = 24; /** - *

一周7天

+ *

一周 7

*/ public static final int DAY_PER_WEEK = 7; @@ -54,62 +54,62 @@ public class Constant { public static final int SECOND_PER_DAY = SECOND_PER_HOUR * HOUR_PER_DAY; /** - *

本机IP地址

+ *

本机 IP 地址

*/ public static final String LOCAL_IP_ADDRESS = "127.0.0.1"; /** - *

空字符串

+ *

空字符串

*/ public static final String EMPTY_STRING = ""; /** - *

下划线

+ *

下划线 _

*/ public final static String UNDERLINE = "_"; /** - *

半角空格

+ *

半角空格

*/ public final static String SPACE = " "; /** - *

半角逗号

+ *

半角逗号 ,

*/ public final static String COMMA = ","; /** - *

半角冒号

+ *

半角冒号 :

*/ public final static String COLON = ":"; /** - *

分号

+ *

分号 ;

*/ public final static String SEMICOLON = ";"; /** - *

竖线

+ *

竖线 |

*/ public final static String VERTICAL_LINE = "|"; /** - *

斜线

+ *

斜线 /

*/ public final static String SLASH = "/"; /** - *

横线

+ *

横线 -

*/ public final static String LINE = "-"; /** - *

等号

+ *

等号 =

*/ public final static String EQUAL = "="; /** - *

+ *

.

*/ public final static String DOT = "."; @@ -119,117 +119,117 @@ public class Constant { public static final String DOT_REGEX = "\\."; /** - *

*

+ *

星号 *

*/ public final static String ASTERISK = "*"; /** - *

%

+ *

百分号 %

*/ public static final String PERCENT = "%"; /** - *

控制器后缀

+ *

控制器后缀 Controller

*/ public static final String CONTROLLER_SUFFIX = "Controller"; /** - *

get

+ *

get

*/ public static final String GET = "get"; /** - *

Key

+ *

Key

*/ public static final String KEY = "key"; /** - *

Label

+ *

Label

*/ public static final String LABEL = "label"; /** - *

Error

+ *

Error

*/ public static final String ERROR = "error"; /** - *

Name

+ *

Name

*/ public static final String NAME = "name"; /** - *

Code

+ *

Code

*/ public static final String CODE = "code"; /** - *

Message

+ *

Message

*/ public static final String MESSAGE = "message"; /** - *

Success

+ *

Success

*/ public static final String SUCCESS = "success"; /** - *

Value

+ *

Value

*/ public static final String VALUE = "value"; /** - *

Double 0

+ *

Double 0D

*/ public static final double ZERO_DOUBLE = 0D; /** - *

Long 0

+ *

Long 0L

*/ public static final long ZERO_LONG = 0L; /** - *

Int 0

+ *

Int 0

*/ public static final int ZERO_INT = 0; /** - *

String 0

+ *

String "0"

*/ public static final String ZERO_STRING = "0"; /** - *

String 1

+ *

String "1"

*/ public static final String ONE_STRING = "1"; /** - *

String true

+ *

String "true"

*/ public static final String TRUE_STRING = "true"; /** - *

String false

+ *

String "false"

*/ public static final String FALSE_STRING = "false"; /** - *

JSON成功状态码

+ *

JSON 成功状态码

*/ public static final int JSON_SUCCESS_CODE = HttpStatus.OK.value(); /** - *

JSON成功信息

+ *

JSON 成功信息

*/ public static final String JSON_SUCCESS_MESSAGE = "操作成功"; /** - *

ContentType

+ *

ContentType

*/ public static final String CONTENT_TYPE = "Content-Type"; /** - *

Cookie

+ *

Cookie

*/ public static final String COOKIE = "Cookie"; @@ -244,17 +244,17 @@ public class Constant { public static final String LINE_BREAK = "\n"; /** - *

TAB

+ *

TAB

*/ public static final String TAB = "\t"; /** - *

+ *

"是"

*/ public static final String YES = "是"; /** - *

+ *

"否"

*/ public static final String NO = "否"; } diff --git a/airpower-core/src/main/java/cn/hamm/airpower/config/CookieConfig.java b/airpower-core/src/main/java/cn/hamm/airpower/config/CookieConfig.java index bf229a3..ab7c9f7 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/config/CookieConfig.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/config/CookieConfig.java @@ -8,7 +8,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.stereotype.Component; /** - *

Cookie相关配置

+ *

Cookie 相关配置

* * @author Hamm.cn * @see CookieUtil @@ -20,27 +20,27 @@ import org.springframework.stereotype.Component; @ConfigurationProperties("airpower.cookie") public class CookieConfig { /** - *

Cookie的路径

+ *

Cookie 的路径

*/ private String cookiePath = Constant.SLASH; /** - *

身份验证的Cookie名称

+ *

身份验证的 Cookie 名称

*/ private String authCookieName = "authorization-key"; /** - *

Cookie的HttpOnly配置

+ *

CookieHttpOnly 配置

*/ private boolean cookieHttpOnly = true; /** - *

Cookie有效期

+ *

Cookie 有效期

*/ private int cookieMaxAge = Constant.SECOND_PER_DAY; /** - *

使用Https方式的安全Cookie

+ *

使用 Https 方式的安全 Cookie

*/ private boolean cookieSecurity = true; } diff --git a/airpower-core/src/main/java/cn/hamm/airpower/config/MqttConfig.java b/airpower-core/src/main/java/cn/hamm/airpower/config/MqttConfig.java index b4e17c0..99ff655 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/config/MqttConfig.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/config/MqttConfig.java @@ -7,7 +7,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.stereotype.Component; /** - *

MQTT配置类

+ *

MQTT 配置类

* * @author Hamm.cn */ diff --git a/airpower-core/src/main/java/cn/hamm/airpower/config/ServiceConfig.java b/airpower-core/src/main/java/cn/hamm/airpower/config/ServiceConfig.java index f281ff5..fd2d704 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/config/ServiceConfig.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/config/ServiceConfig.java @@ -24,7 +24,7 @@ public class ServiceConfig { private String databasePrefix = "tenant_"; /** - *

默认服务ID

+ *

默认服务 ID

*/ private int serviceId = Constant.ZERO_INT; @@ -34,7 +34,7 @@ public class ServiceConfig { private boolean enableDocument = false; /** - *

AccessToken的密钥

+ *

AccessToken 的密钥

*/ private String accessTokenSecret = Constant.AIRPOWER; @@ -69,7 +69,7 @@ public class ServiceConfig { private String defaultSortDirection = "desc"; /** - *

身份令牌header的key

+ *

身份令牌 headerkey

*/ private String authorizeHeader = HttpHeaders.AUTHORIZATION; @@ -79,7 +79,7 @@ public class ServiceConfig { private long authorizeExpireSecond = Constant.SECOND_PER_DAY; /** - *

多租户的header的key

+ *

多租户的 headerkey

*/ private String tenantHeader = "tenant-code"; @@ -98,12 +98,12 @@ public class ServiceConfig { private boolean debug = true; /** - *

MQTT配置

+ *

MQTT 配置

*/ private MqttConfig mqtt = new MqttConfig(); /** - *

Cookie配置

+ *

Cookie 配置

*/ private CookieConfig cookie = new CookieConfig(); } diff --git a/airpower-core/src/main/java/cn/hamm/airpower/config/WebSocketConfig.java b/airpower-core/src/main/java/cn/hamm/airpower/config/WebSocketConfig.java index a7c3c58..9bc65b9 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/config/WebSocketConfig.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/config/WebSocketConfig.java @@ -8,7 +8,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.stereotype.Component; /** - *

WebSocket配置

+ *

WebSocket 配置

* * @author Hamm */ @@ -19,22 +19,22 @@ import org.springframework.stereotype.Component; @ConfigurationProperties("airpower.websocket") public class WebSocketConfig { /** - *

PING

+ *

PING

*/ private String ping = "PING"; /** - *

PONG

+ *

PONG

*/ private String pong = "PONG"; /** - *

Websocket 路径

+ *

WebSocket 路径

*/ private String path = "/websocket"; /** - *

WebSocket支持方式

+ *

WebSocket 支持方式

*/ private WebSocketSupport support = WebSocketSupport.NO; @@ -44,7 +44,7 @@ public class WebSocketConfig { private String channelPrefix; /** - *

WebSocket允许的跨域

+ *

WebSocket 允许的跨域

*/ private String allowedOrigins = "*"; } diff --git a/airpower-core/src/main/java/cn/hamm/airpower/enums/ContentType.java b/airpower-core/src/main/java/cn/hamm/airpower/enums/ContentType.java index 3a4af0a..31115ce 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/enums/ContentType.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/enums/ContentType.java @@ -13,32 +13,32 @@ import org.springframework.http.MediaType; @AllArgsConstructor public enum ContentType { /** - *

JSON

+ *

JSON

*/ JSON(MediaType.APPLICATION_JSON_VALUE), /** - *

HTML

+ *

HTML

*/ HTML(MediaType.TEXT_HTML_VALUE), /** - *

PLAIN

+ *

PLAIN

*/ PLAIN(MediaType.TEXT_PLAIN_VALUE), /** - *

XML

+ *

XML

*/ XML(MediaType.TEXT_XML_VALUE), /** - *

FORM_URLENCODED

+ *

FORM_URLENCODED

*/ FORM_URLENCODED(MediaType.APPLICATION_FORM_URLENCODED_VALUE), /** - *

MULTIPART_FORM_DATA

+ *

MULTIPART_FORM_DATA

*/ MULTIPART_FORM_DATA(MediaType.MULTIPART_FORM_DATA_VALUE); diff --git a/airpower-core/src/main/java/cn/hamm/airpower/enums/HttpMethod.java b/airpower-core/src/main/java/cn/hamm/airpower/enums/HttpMethod.java index 30e784a..6c6b0cb 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/enums/HttpMethod.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/enums/HttpMethod.java @@ -1,28 +1,28 @@ package cn.hamm.airpower.enums; /** - *

HTTP请求方式

+ *

HTTP 请求方式

* * @author Hamm.cn */ public enum HttpMethod { /** - *

GET

+ *

GET

*/ GET, /** - *

POST

+ *

POST

*/ POST, /** - *

PUT

+ *

PUT

*/ PUT, /** - *

DELETE

+ *

DELETE

*/ DELETE, } diff --git a/airpower-core/src/main/java/cn/hamm/airpower/interceptor/AbstractRequestInterceptor.java b/airpower-core/src/main/java/cn/hamm/airpower/interceptor/AbstractRequestInterceptor.java index a245f80..101d0c1 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/interceptor/AbstractRequestInterceptor.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/interceptor/AbstractRequestInterceptor.java @@ -37,7 +37,7 @@ import java.util.Objects; @Slf4j public abstract class AbstractRequestInterceptor implements HandlerInterceptor { /** - *

缓存的REQUEST_METHOD_KEY

+ *

缓存的 REQUEST_METHOD_KEY

*/ protected static final String REQUEST_METHOD_KEY = "REQUEST_METHOD_KEY"; @@ -112,7 +112,7 @@ public abstract class AbstractRequestInterceptor implements HandlerInterceptor { /** *

验证指定的用户是否有指定权限标识的权限

* - * @param userId 用户ID + * @param userId 用户 ID * @param permissionIdentity 权限标识 * @param request 请求对象 * @apiNote 抛出异常则为拦截 diff --git a/airpower-core/src/main/java/cn/hamm/airpower/interceptor/ExceptionInterceptor.java b/airpower-core/src/main/java/cn/hamm/airpower/interceptor/ExceptionInterceptor.java index f0b88f9..95072ea 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/interceptor/ExceptionInterceptor.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/interceptor/ExceptionInterceptor.java @@ -115,7 +115,7 @@ public class ExceptionInterceptor { } /** - *

请求的数据不是标准JSON

+ *

请求的数据不是标准 JSON

*/ @ExceptionHandler(HttpMessageNotReadableException.class) public Json dataExceptionHandle(@NotNull HttpMessageNotReadableException exception) { @@ -163,7 +163,7 @@ public class ExceptionInterceptor { } /** - *

REDIS连接发生错误

+ *

Redis 连接发生错误

*/ @ExceptionHandler(RedisConnectionFailureException.class) public Json redisExceptionHandle(@NotNull RedisConnectionFailureException exception) { diff --git a/airpower-core/src/main/java/cn/hamm/airpower/interfaces/IDictionary.java b/airpower-core/src/main/java/cn/hamm/airpower/interfaces/IDictionary.java index 715ba77..935710a 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/interfaces/IDictionary.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/interfaces/IDictionary.java @@ -10,9 +10,9 @@ import cn.hamm.airpower.util.ReflectUtil; */ public interface IDictionary { /** - *

获取枚举的key

+ *

获取枚举的 Key

* - * @return key + * @return Key */ int getKey(); @@ -24,9 +24,9 @@ public interface IDictionary { String getLabel(); /** - *

判断Key是否相等

+ *

判断 Key 是否相等

* - * @param key 被判断的Key + * @param key 被判断的 Key * @return 对比结果 */ default boolean equalsKey(int key) { @@ -34,9 +34,9 @@ public interface IDictionary { } /** - *

判断Key是否不相等

+ *

判断 Key 是否不相等

* - * @param key 被判断的Key + * @param key 被判断的 Key * @return 对比结果 */ default boolean notEqualsKey(int key) { diff --git a/airpower-core/src/main/java/cn/hamm/airpower/interfaces/IEntity.java b/airpower-core/src/main/java/cn/hamm/airpower/interfaces/IEntity.java index 6b4c67b..8fd4525 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/interfaces/IEntity.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/interfaces/IEntity.java @@ -7,16 +7,16 @@ package cn.hamm.airpower.interfaces; */ public interface IEntity> { /** - *

获取主键ID

+ *

获取主键 ID

* - * @return 主键ID + * @return 主键 ID */ Long getId(); /** - *

设置实体主键ID

+ *

设置实体主键 ID

* - * @param id 主键ID + * @param id 主键 ID * @return 实体 */ E setId(Long id); diff --git a/airpower-core/src/main/java/cn/hamm/airpower/interfaces/IEntityAction.java b/airpower-core/src/main/java/cn/hamm/airpower/interfaces/IEntityAction.java index 9335e41..f7fb1dc 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/interfaces/IEntityAction.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/interfaces/IEntityAction.java @@ -7,7 +7,7 @@ package cn.hamm.airpower.interfaces; */ public interface IEntityAction extends IAction { /** - *

ID必须传入的场景

+ *

ID 必须传入的场景

*/ interface WhenIdRequired { } diff --git a/airpower-core/src/main/java/cn/hamm/airpower/interfaces/IFile.java b/airpower-core/src/main/java/cn/hamm/airpower/interfaces/IFile.java index 908d6cf..1bcd5bb 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/interfaces/IFile.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/interfaces/IFile.java @@ -7,16 +7,16 @@ package cn.hamm.airpower.interfaces; */ public interface IFile> extends IEntity { /** - *

获取文件的URL

+ *

获取文件的 URL

* - * @return URL + * @return URL */ String getUrl(); /** - *

设置文件的URL

+ *

设置文件的 URL

* - * @param url URL + * @param url URL * @return 实体 */ E setUrl(String url); diff --git a/airpower-core/src/main/java/cn/hamm/airpower/interfaces/IFunction.java b/airpower-core/src/main/java/cn/hamm/airpower/interfaces/IFunction.java index ad80dea..c717d69 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/interfaces/IFunction.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/interfaces/IFunction.java @@ -4,7 +4,7 @@ import java.io.Serializable; import java.util.function.Function; /** - *

带序列化的Function

+ *

带序列化的 Function

* * @author Hamm.cn */ diff --git a/airpower-core/src/main/java/cn/hamm/airpower/interfaces/ITree.java b/airpower-core/src/main/java/cn/hamm/airpower/interfaces/ITree.java index 25bfff5..2bae5c9 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/interfaces/ITree.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/interfaces/ITree.java @@ -24,19 +24,26 @@ public interface ITree> extends IEntity { E setName(String name); /** - *

设置父级ID

+ *

获取树的父级 ID

* - * @param parentId 设置父级ID + * @return 父级 ID + */ + Long getParentId(); + + /** + *

设置父级 ID

+ * + * @param parentId 设置父级 ID * @return 树实体 */ E setParentId(Long parentId); /** - *

获取树的父级ID

+ *

获取树的子集列表

* - * @return 父级ID + * @return 树的子集 */ - Long getParentId(); + List getChildren(); /** *

设置树的子集列表

@@ -46,11 +53,4 @@ public interface ITree> extends IEntity { */ @SuppressWarnings("UnusedReturnValue") E setChildren(List children); - - /** - *

获取树的子集列表

- * - * @return 树的子集 - */ - List getChildren(); } diff --git a/airpower-core/src/main/java/cn/hamm/airpower/model/Json.java b/airpower-core/src/main/java/cn/hamm/airpower/model/Json.java index 04935aa..02c7c22 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/model/Json.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/model/Json.java @@ -24,7 +24,7 @@ import java.util.Map; import java.util.Objects; /** - *

简单JSON对象

+ *

简单 JSON 对象

* * @author Hamm.cn */ @@ -33,7 +33,7 @@ import java.util.Objects; @Slf4j public class Json { /** - *

ObjectMapper

+ *

ObjectMapper

*/ private static ObjectMapper objectMapper = null; @@ -48,7 +48,7 @@ public class Json { */ @Description("错误信息") private String message = Constant.JSON_SUCCESS_MESSAGE; - + /** *

返回数据

*/ @@ -64,7 +64,7 @@ public class Json { *

输出提示信息

* * @param message 提示信息 - * @return Json + * @return Json */ public static Json success(String message) { return create().setMessage(message); @@ -74,7 +74,7 @@ public class Json { *

输出数据

* * @param data 数据 - * @return Json + * @return Json */ public static Json data(Object data) { return data(data, "获取成功"); @@ -83,9 +83,9 @@ public class Json { /** *

输出实体

* - * @param id 实体ID + * @param id 实体 ID * @param 实体类型 - * @return Json + * @return Json */ public static > Json entity(@NotNull Long id) { return data(new RootEntity().setId(id)); @@ -94,9 +94,9 @@ public class Json { /** *

输出实体

* - * @param id 实体ID + * @param id 实体 Json * @param message 提示信息 - * @return Json + * @return Json */ public static Json entity(@NotNull Long id, @NotNull String message) { return entity(id).setMessage(message); @@ -107,7 +107,7 @@ public class Json { * * @param data 数据 * @param message 提示信息 - * @return Json + * @return Json */ public static Json data(Object data, String message) { return create().setData(data).setMessage(message); @@ -117,7 +117,7 @@ public class Json { *

输出错误

* * @param error 错误枚举 - * @return Json + * @return Json */ public static Json error(IException error) { return error(error, error.getMessage()); @@ -128,7 +128,7 @@ public class Json { * * @param error 错误枚举 * @param message 错误信息 - * @return Json + * @return Json */ public static Json error(@NotNull IException error, String message) { return show(error.getCode(), message, null); @@ -138,26 +138,26 @@ public class Json { *

输出错误

* * @param message 错误信息 - * @return Json + * @return Json */ public static Json error(String message) { return error(ServiceError.SERVICE_ERROR, message); } /** - *

输出Json

+ *

输出 Json

* * @param code 错误代码 * @param message 提示信息 * @param data 输出数据 - * @return Json + * @return Json */ public static Json show(int code, String message, Object data) { return create().setCode(code).setMessage(message).setData(data); } /** - *

Json反序列化到指定类

+ *

Json 反序列化到指定类

* * @param json 字符串 * @param clazz 目标类 @@ -174,10 +174,10 @@ public class Json { } /** - *

Json反序列化位Map

+ *

Json 反序列化为 Map

* * @param json 字符串 - * @return Map + * @return Map */ public static Map parse2Map(String json) { try { @@ -191,10 +191,10 @@ public class Json { } /** - *

Json反序列化为ListMap

+ *

Json 反序列化为 ListMap

* * @param json 字符串 - * @return List + * @return List */ public static List> parse2MapList(String json) { try { @@ -208,7 +208,7 @@ public class Json { } /** - *

Json序列化到字符串

+ *

Json 序列化到字符串

* * @param object 对象 * @return 字符串 @@ -223,9 +223,9 @@ public class Json { } /** - *

获取一个配置后的ObjectMapper

+ *

获取一个配置后的 ObjectMapper

* - * @return ObjectMapper + * @return ObjectMapper */ private static @NotNull ObjectMapper getObjectMapper() { if (Objects.isNull(objectMapper)) { @@ -241,9 +241,9 @@ public class Json { } /** - *

初始化一个新的JSON对象

+ *

初始化一个新的 JSON 对象

* - * @return JSON对象 + * @return JSON 对象 */ @Contract(" -> new") public static @NotNull Json create() { diff --git a/airpower-core/src/main/java/cn/hamm/airpower/open/IOpenApp.java b/airpower-core/src/main/java/cn/hamm/airpower/open/IOpenApp.java index 07eba8a..fe89cd0 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/open/IOpenApp.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/open/IOpenApp.java @@ -8,16 +8,16 @@ package cn.hamm.airpower.open; */ public interface IOpenApp { /** - *

获取应用的AppKey

+ *

获取应用的 AppKey

* - * @return AppKey + * @return AppKey */ String getAppKey(); /** - *

获取应用的AppSecret

+ *

获取应用的 AppSecret

* - * @return AppSecret + * @return AppSecret */ String getAppSecret(); diff --git a/airpower-core/src/main/java/cn/hamm/airpower/open/IOpenAppService.java b/airpower-core/src/main/java/cn/hamm/airpower/open/IOpenAppService.java index 65f0834..5b7b336 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/open/IOpenAppService.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/open/IOpenAppService.java @@ -1,16 +1,16 @@ package cn.hamm.airpower.open; /** - *

开放应用的Service接口

+ *

开放应用的 Service 接口

* * @author Hamm.cn * @apiNote 请确保你的开放应用的Service实现了此接口 */ public interface IOpenAppService { /** - *

通过应用的AppKey查一个应用

+ *

通过应用的 AppKey 查一个应用

* - * @param appKey AppKey + * @param appKey AppKey * @return 应用 */ IOpenApp getByAppKey(String appKey); diff --git a/airpower-core/src/main/java/cn/hamm/airpower/open/IOpenLogService.java b/airpower-core/src/main/java/cn/hamm/airpower/open/IOpenLogService.java index 1de0a18..8a42c1c 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/open/IOpenLogService.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/open/IOpenLogService.java @@ -4,7 +4,7 @@ package cn.hamm.airpower.open; *

开放应用请求日志接口

* * @author Hamm.cn - * @apiNote 请确保你的应用请求日志Service实现了此接口,否则将无法记录请求日志 + * @apiNote 请确保你的应用请求日志 Service 实现了此接口,否则将无法记录请求日志 */ public interface IOpenLogService { /** @@ -20,7 +20,7 @@ public interface IOpenLogService { /** *

更新请求日志

* - * @param openLogId 请求日志ID + * @param openLogId 请求日志 ID * @param responseBody 响应体 */ void updateResponse(Long openLogId, String responseBody); diff --git a/airpower-core/src/main/java/cn/hamm/airpower/open/OpenApi.java b/airpower-core/src/main/java/cn/hamm/airpower/open/OpenApi.java index bca968b..1e89336 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/open/OpenApi.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/open/OpenApi.java @@ -3,7 +3,7 @@ package cn.hamm.airpower.open; import java.lang.annotation.*; /** - *

OpenApi

+ *

OpenApi

* * @author Hamm.cn */ diff --git a/airpower-core/src/main/java/cn/hamm/airpower/open/OpenApiAspect.java b/airpower-core/src/main/java/cn/hamm/airpower/open/OpenApiAspect.java index 5f2ef44..de1ead9 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/open/OpenApiAspect.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/open/OpenApiAspect.java @@ -20,7 +20,7 @@ import java.lang.reflect.Method; import java.util.Objects; /** - *

OpenApi切面

+ *

OpenApi 切面

* * @author Hamm.cn */ @@ -40,7 +40,7 @@ public class OpenApiAspect开放API + *

OpenApi

*/ @Around("pointCut()") public Object openApi(@NotNull ProceedingJoinPoint proceedingJoinPoint) throws Throwable { @@ -84,10 +84,10 @@ public class OpenApiAspect从请求对象中获取OpenApp + *

从请求对象中获取 OpenApp

* - * @param openRequest OpenRequest - * @return OpenApp + * @param openRequest OpenRequest + * @return OpenApp */ private @NotNull IOpenApp getOpenAppFromRequest(@NotNull OpenRequest openRequest) { ServiceError.INVALID_APP_KEY.when(!StringUtils.hasText(openRequest.getAppKey())); @@ -100,8 +100,8 @@ public class OpenApiAspect添加日志 * - * @param openApp OpenApp - * @param url 请求URL + * @param openApp OpenApp + * @param url 请求 URL * @param requestBody 请求数据 * @return 日志ID */ @@ -115,7 +115,7 @@ public class OpenApiAspect更新日志返回数据 * - * @param openLogId 日志ID + * @param openLogId 日志 ID * @param responseBody 返回值 */ private void updateLogResponse(Long openLogId, String responseBody) { @@ -128,7 +128,7 @@ public class OpenApiAspect更新日志异常 * - * @param openLogId 日志ID + * @param openLogId 日志 ID * @param exception 异常 */ private void updateExceptionResponse(Long openLogId, Exception exception) { diff --git a/airpower-core/src/main/java/cn/hamm/airpower/open/OpenArithmeticType.java b/airpower-core/src/main/java/cn/hamm/airpower/open/OpenArithmeticType.java index b16c5d2..7a29173 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/open/OpenArithmeticType.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/open/OpenArithmeticType.java @@ -13,12 +13,12 @@ import lombok.Getter; @Getter public enum OpenArithmeticType implements IDictionary { /** - *

AES算法

+ *

AES 算法

*/ AES(1, "AES"), /** - *

RSA算法

+ *

RSA 算法

*/ RSA(2, "RSA"), diff --git a/airpower-core/src/main/java/cn/hamm/airpower/open/OpenBaseModel.java b/airpower-core/src/main/java/cn/hamm/airpower/open/OpenBaseModel.java index c0a9952..fcec188 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/open/OpenBaseModel.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/open/OpenBaseModel.java @@ -3,7 +3,7 @@ package cn.hamm.airpower.open; import cn.hamm.airpower.root.RootModel; /** - *

OpenApi数据模型基类

+ *

OpenApi 数据模型基类

* * @author Hamm.cn */ diff --git a/airpower-core/src/main/java/cn/hamm/airpower/open/OpenRequest.java b/airpower-core/src/main/java/cn/hamm/airpower/open/OpenRequest.java index 7b744d6..532c73e 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/open/OpenRequest.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/open/OpenRequest.java @@ -14,7 +14,7 @@ import lombok.extern.slf4j.Slf4j; import org.apache.commons.codec.digest.DigestUtils; /** - *

OpenApi请求体

+ *

OpenApi 请求体

* * @author Hamm.cn */ @@ -32,7 +32,7 @@ public class OpenRequest { private static final int NONCE_CACHE_SECOND = 60; /** - *

AppKey

+ *

AppKey

*/ @NotBlank(message = "AppKey不能为空") @Getter diff --git a/airpower-core/src/main/java/cn/hamm/airpower/open/OpenResponse.java b/airpower-core/src/main/java/cn/hamm/airpower/open/OpenResponse.java index 06f45e7..b4dc169 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/open/OpenResponse.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/open/OpenResponse.java @@ -8,7 +8,7 @@ import cn.hamm.airpower.util.Utils; import java.util.Objects; /** - *

开放接口的响应对象

+ *

OpenApi 响应对象

* * @author Hamm.cn */ diff --git a/airpower-core/src/main/java/cn/hamm/airpower/resolver/AccessResolver.java b/airpower-core/src/main/java/cn/hamm/airpower/resolver/AccessResolver.java index e4d32a8..6945519 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/resolver/AccessResolver.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/resolver/AccessResolver.java @@ -34,7 +34,7 @@ public class AccessResolver implements HandlerMethodArgumentResolver { } /** - *

ACCESS_TOKEN换用户ID

+ *

ACCESS_TOKEN 换用户 ID

*/ @Override public final @NotNull @Unmodifiable Object resolveArgument( diff --git a/airpower-core/src/main/java/cn/hamm/airpower/root/RootController.java b/airpower-core/src/main/java/cn/hamm/airpower/root/RootController.java index 89cc88f..f1f6258 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/root/RootController.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/root/RootController.java @@ -23,7 +23,7 @@ public class RootController implements IAction { /** *

获取当前登录用户的信息

* - * @return 用户ID + * @return 用户 ID */ protected final long getCurrentUserId() { try { diff --git a/airpower-core/src/main/java/cn/hamm/airpower/root/RootEntity.java b/airpower-core/src/main/java/cn/hamm/airpower/root/RootEntity.java index d4c59b6..e128b60 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/root/RootEntity.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/root/RootEntity.java @@ -114,9 +114,9 @@ public class RootEntity> extends RootModel private Long updateTimeTo; /** - *

设置ID

+ *

设置 ID

* - * @param id ID + * @param id ID * @return 实体 */ @Override @@ -159,9 +159,9 @@ public class RootEntity> extends RootModel } /** - *

设置创建人ID

+ *

设置创建人 ID

* - * @param createUserId 创建人ID + * @param createUserId 创建人 ID * @return 实体 */ public E setCreateUserId(Long createUserId) { @@ -170,9 +170,9 @@ public class RootEntity> extends RootModel } /** - *

设置修改人ID

+ *

设置修改人 ID

* - * @param updateUserId 修改人ID + * @param updateUserId 修改人 ID * @return 实体 */ public E setUpdateUserId(Long updateUserId) { @@ -206,9 +206,9 @@ public class RootEntity> extends RootModel } /** - *

复制一个只包含ID的实体

+ *

复制一个只包含 ID 的实体

* - * @return 只复制ID的实体 + * @return 只复制 ID 的实体 */ public final @org.jetbrains.annotations.NotNull E copyOnlyId() { try { diff --git a/airpower-core/src/main/java/cn/hamm/airpower/root/RootEntityController.java b/airpower-core/src/main/java/cn/hamm/airpower/root/RootEntityController.java index 841c3ec..8f20dfb 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/root/RootEntityController.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/root/RootEntityController.java @@ -65,7 +65,7 @@ public class RootEntityController< /** *

添加一条新数据接口

* - * @apiNote 🔴可被子控制器类注解 {@link Extends} 继承或忽略,不建议重写,可使用前后置方法来处理业务逻辑。 + * @apiNote 可被子控制器类注解 {@link Extends} 继承或忽略,不建议重写,可使用前后置方法来处理业务逻辑。 * @see #beforeAdd(E) * @see #afterAdd(long, E) * @see #afterSaved(long, E) @@ -89,7 +89,7 @@ public class RootEntityController< /** *

修改一条已存在的数据接口

* - * @apiNote 🔴可被子控制器类注解 {@link Extends} 继承或忽略,不建议重写,可使用前后置方法来处理业务逻辑。 + * @apiNote 可被子控制器类注解 {@link Extends} 继承或忽略,不建议重写,可使用前后置方法来处理业务逻辑。 * @see #beforeUpdate(E) * @see #afterUpdate(long, E) * @see #afterSaved(long, E) @@ -114,7 +114,7 @@ public class RootEntityController< /** *

删除一条已存在的数据接口

* - * @apiNote 🔴可被子控制器类注解 {@link Extends} 继承或忽略,不建议重写,可使用前后置方法来处理业务逻辑。 + * @apiNote 可被子控制器类注解 {@link Extends} 继承或忽略,不建议重写,可使用前后置方法来处理业务逻辑。 * @see #beforeDelete(long) * @see #afterDelete(long) */ @@ -134,7 +134,7 @@ public class RootEntityController< /** *

查询一条详情数据

* - * @apiNote 🔴可被子控制器类注解 {@link Extends} 继承或忽略,不建议重写,可使用前后置方法来处理业务逻辑。 + * @apiNote 可被子控制器类注解 {@link Extends} 继承或忽略,不建议重写,可使用前后置方法来处理业务逻辑。 * @see #afterGetDetail(E) */ @Description("查询详情") @@ -148,7 +148,7 @@ public class RootEntityController< /** *

禁用一条已存在的数据

* - * @apiNote 🔴可被子控制器类注解 {@link Extends} 继承或忽略,不建议重写,可使用前后置方法来处理业务逻辑。 + * @apiNote 可被子控制器类注解 {@link Extends} 继承或忽略,不建议重写,可使用前后置方法来处理业务逻辑。 * @see #beforeDisable(long) * @see #afterDisable(long) */ @@ -168,7 +168,7 @@ public class RootEntityController< /** *

启用一条已存在的数据

* - * @apiNote 🔴可被子控制器类注解 {@link Extends} 继承或忽略,不建议重写,可使用前后置方法来处理业务逻辑。 + * @apiNote 可被子控制器类注解 {@link Extends} 继承或忽略,不建议重写,可使用前后置方法来处理业务逻辑。 * @see #beforeEnable(long) * @see #afterEnable(long) */ @@ -188,7 +188,7 @@ public class RootEntityController< /** *

不分页查询

* - * @apiNote 🔴可被子控制器类注解 {@link Extends} 继承或忽略,不建议重写,可使用前后置方法来处理业务逻辑。 + * @apiNote 可被子控制器类注解 {@link Extends} 继承或忽略,不建议重写,可使用前后置方法来处理业务逻辑。 * @see #beforeGetList(QueryRequest) * @see #afterGetList(List) */ @@ -205,7 +205,7 @@ public class RootEntityController< /** *

分页查询

* - * @apiNote 🔴可被子控制器类注解 {@link Extends} 继承或忽略,不建议重写,可使用前后置方法来处理业务逻辑。 + * @apiNote 可被子控制器类注解 {@link Extends} 继承或忽略,不建议重写,可使用前后置方法来处理业务逻辑。 * @see #beforeGetPage(QueryPageRequest) * @see #afterGetPage(QueryPageResponse) */ @@ -277,7 +277,7 @@ public class RootEntityController< /** *

新增后置方法

* - * @param id 主键ID + * @param id 主键 ID * @param source 原始实体 * @apiNote 可重写后执行新增后的其他业务 */ @@ -299,7 +299,7 @@ public class RootEntityController< /** *

修改后置方法

* - * @param id 主键ID + * @param id 主键 ID * @param source 原始实体 * @apiNote 可重写后执行修改之后的其他业务 */ @@ -310,7 +310,7 @@ public class RootEntityController< /** *

保存后置方法

* - * @param id 主键ID + * @param id 主键 ID * @param source 原始实体 * @apiNote 新增和修改最后触发 */ @@ -321,7 +321,7 @@ public class RootEntityController< /** *

删除前置方法

* - * @param id 主键ID + * @param id 主键 ID * @apiNote 可重写后执行删除之前的业务处理或拦截 */ @SuppressWarnings({"unused", "EmptyMethod"}) @@ -331,7 +331,7 @@ public class RootEntityController< /** * 删除后置方法 * - * @param id 主键ID + * @param id 主键 ID * @apiNote 可重写后执行删除之后的其他业务 */ @SuppressWarnings({"unused", "EmptyMethod"}) @@ -341,7 +341,7 @@ public class RootEntityController< /** *

禁用前置方法

* - * @param id 主键ID + * @param id 主键 ID * @apiNote 可重写后执行禁用之前的业务处理或拦截 */ @SuppressWarnings({"unused", "EmptyMethod"}) @@ -351,7 +351,7 @@ public class RootEntityController< /** *

禁用后置方法

* - * @param id 主键ID + * @param id 主键 ID * @apiNote 可重写后执行禁用之后的其他业务 */ @SuppressWarnings({"unused", "EmptyMethod"}) @@ -361,7 +361,7 @@ public class RootEntityController< /** *

启用前置方法

* - * @param id 主键ID + * @param id 主键 ID */ @SuppressWarnings({"unused", "EmptyMethod"}) protected void beforeEnable(long id) { @@ -370,7 +370,7 @@ public class RootEntityController< /** *

启用后置方法

* - * @param id 主键ID + * @param id 主键 ID */ @SuppressWarnings({"unused", "EmptyMethod"}) protected void afterEnable(long id) { diff --git a/airpower-core/src/main/java/cn/hamm/airpower/root/RootService.java b/airpower-core/src/main/java/cn/hamm/airpower/root/RootService.java index 66c969a..d8f2ee6 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/root/RootService.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/root/RootService.java @@ -57,12 +57,6 @@ import java.util.function.BiFunction; @SuppressWarnings({"unchecked", "SpringJavaInjectionPointsAutowiringInspection"}) @Slf4j public class RootService, R extends RootRepository> { - /** - *

数据源

- */ - @Autowired - protected R repository; - /** *

导出文件夹前缀

*/ @@ -75,6 +69,11 @@ public class RootService, R extends RootRepository> { *

导出文件后缀

*/ private static final String EXPORT_FILE_CSV = ".csv"; + /** + *

数据源

+ */ + @Autowired + protected R repository; @Autowired private ReflectUtil reflectUtil; @Autowired @@ -115,7 +114,7 @@ public class RootService, R extends RootRepository> { } /** - *

🟢导出查询前置方法

+ *

导出查询前置方法

* * @param queryRequest 查询请求 * @return 处理后的查询请求 @@ -125,7 +124,7 @@ public class RootService, R extends RootRepository> { } /** - *

🟢创建导出数据的文件字节流

+ *

创建导出数据的文件字节流

* * @param exportList 导出的数据 * @return 导出的文件的字节流 @@ -174,7 +173,7 @@ public class RootService, R extends RootRepository> { } /** - *

🟢保存导出生成的文件

+ *

保存导出生成的文件

* * @param exportFileStream 导出的文件字节流 * @return 存储后的可访问路径 @@ -218,7 +217,7 @@ public class RootService, R extends RootRepository> { } /** - *

🟢导出查询后置方法

+ *

导出查询后置方法

* * @param exportList 导出的数据列表 * @return 处理后的数据列表 @@ -242,7 +241,7 @@ public class RootService, R extends RootRepository> { } /** - *

🟢添加前置方法

+ *

添加前置方法

* * @param source 原始实体 * @return 处理后的实体 @@ -252,10 +251,10 @@ public class RootService, R extends RootRepository> { } /** - *

🟡添加一条数据

+ *

添加一条数据

* * @param source 原始实体 - * @return 保存后的主键ID + * @return 保存后的主键 ID * @see #beforeAdd(E) * @see #beforeSaveToDatabase(E) * @see #afterAdd(long, E) @@ -275,9 +274,9 @@ public class RootService, R extends RootRepository> { } /** - *

🟢添加后置方法

+ *

添加后置方法

* - * @param id 主键ID + * @param id 主键 ID * @param source 原始实体 */ @SuppressWarnings({"unused", "EmptyMethod"}) @@ -285,7 +284,7 @@ public class RootService, R extends RootRepository> { } /** - *

🟢修改前置方法

+ *

修改前置方法

* * @param source 原始实体 * @return 处理后的实体 @@ -295,7 +294,7 @@ public class RootService, R extends RootRepository> { } /** - *

🟡修改一条已经存在的数据

+ *

修改一条已经存在的数据

* * @param source 保存的实体 * @see #beforeUpdate(E) @@ -308,7 +307,7 @@ public class RootService, R extends RootRepository> { } /** - *

🔴修改一条已经存在的数据

+ *

修改一条已经存在的数据

* * @param source 保存的实体 * @apiNote 此方法的 null 属性依然会被更新到数据库 @@ -323,16 +322,16 @@ public class RootService, R extends RootRepository> { } /** - *

🟢修改后置方法

+ *

修改后置方法

* *

- * 🔴请不要在重写此方法后再次调用 {@link #update(E) } 与 {@link #updateWithNull(E)} 以避免循环调用 + * 请不要在重写此方法后再次调用 {@link #update(E) } 与 {@link #updateWithNull(E)} 以避免循环调用 *

*

- * 🟢如需再次保存,请调用 {@link #updateToDatabase(E)} + * 如需再次保存,请调用 {@link #updateToDatabase(E)} *

* - * @param id 主键ID + * @param id 主键 ID * @param source 原始实体 */ @SuppressWarnings({"unused", "EmptyMethod"}) @@ -340,9 +339,9 @@ public class RootService, R extends RootRepository> { } /** - *

🟢保存后置方法

+ *

保存后置方法

* - * @param id 主键ID + * @param id 主键 ID * @param source 保存前的原数据 * @apiNote 添加或修改后最后触发 */ @@ -352,18 +351,18 @@ public class RootService, R extends RootRepository> { } /** - *

🟢禁用前置方法

+ *

禁用前置方法

* - * @param id 主键ID + * @param id 主键 ID */ @SuppressWarnings({"unused", "EmptyMethod"}) protected void beforeDisable(long id) { } /** - *

🟡禁用指定的数据

+ *

禁用指定的数据

* - * @param id 主键ID + * @param id 主键 ID * @see #beforeDisable(long) * @see #afterDisable(long) */ @@ -374,27 +373,27 @@ public class RootService, R extends RootRepository> { } /** - *

🟢禁用后置方法

+ *

禁用后置方法

* - * @param id 主键ID + * @param id 主键 ID */ @SuppressWarnings({"unused", "EmptyMethod"}) protected void afterDisable(long id) { } /** - *

🟢启用前置方法

+ *

启用前置方法

* - * @param id 主键ID + * @param id 主键 ID */ @SuppressWarnings({"unused", "EmptyMethod"}) protected void beforeEnable(long id) { } /** - *

🟡启用指定的数据

+ *

启用指定的数据

* - * @param id 主键ID + * @param id 主键 ID * @see #beforeEnable(long) * @see #afterEnable(long) */ @@ -405,27 +404,27 @@ public class RootService, R extends RootRepository> { } /** - *

🟢启用后置方法

+ *

启用后置方法

* - * @param id 主键ID + * @param id 主键 ID */ @SuppressWarnings({"unused", "EmptyMethod"}) protected void afterEnable(long id) { } /** - *

🟢删除前置方法

+ *

删除前置方法

* - * @param id 主键ID + * @param id 主键 ID */ @SuppressWarnings({"unused", "EmptyMethod"}) protected void beforeDelete(long id) { } /** - *

🟡删除指定的数据

+ *

删除指定的数据

* - * @param id 主键ID + * @param id 主键 ID * @see #beforeDelete(long) * @see #afterDelete(long) */ @@ -436,16 +435,16 @@ public class RootService, R extends RootRepository> { } /** - *

🟢删除后置方法

+ *

删除后置方法

* - * @param id 主键ID + * @param id 主键 ID */ @SuppressWarnings({"unused", "EmptyMethod"}) protected void afterDelete(long id) { } /** - *

🟢不分页查询前置方法

+ *

不分页查询前置方法

* * @param sourceRequestData 查询条件 * @return 处理后的查询条件 @@ -456,7 +455,7 @@ public class RootService, R extends RootRepository> { } /** - *

🟡不分页查询数据

+ *

不分页查询数据

* * @param queryRequest 请求的request * @return List数据 @@ -471,7 +470,7 @@ public class RootService, R extends RootRepository> { } /** - *

🟢查询前置方法

+ *

查询前置方法

* * @param queryRequest 查询请求 * @return 处理后的查询请求 @@ -485,7 +484,7 @@ public class RootService, R extends RootRepository> { } /** - *

🟡过滤数据

+ *

过滤数据

* * @param filter 全匹配过滤器 * @return List数据 @@ -495,7 +494,7 @@ public class RootService, R extends RootRepository> { } /** - *

🟡过滤数据

+ *

过滤数据

* * @param filter 全匹配过滤器 * @param sort 排序 @@ -508,7 +507,7 @@ public class RootService, R extends RootRepository> { } /** - *

🟢不分页查询后置方法

+ *

不分页查询后置方法

* * @param list 查询到的数据 * @return 处理后的数据 @@ -519,7 +518,7 @@ public class RootService, R extends RootRepository> { } /** - *

🟢分页查询前置方法

+ *

分页查询前置方法

* * @param sourceRequestData 原始请求的数据 * @return 处理后的请求数据 @@ -529,7 +528,7 @@ public class RootService, R extends RootRepository> { } /** - *

🟢分页查询后置方法

+ *

分页查询后置方法

* * @param queryPageResponse 查询到的数据 * @return 处理后的数据 @@ -539,7 +538,7 @@ public class RootService, R extends RootRepository> { } /** - *

🟢数据库操作前的最后一次确认

+ *

数据库操作前的最后一次确认

* * @return 当前实体 */ @@ -548,7 +547,7 @@ public class RootService, R extends RootRepository> { } /** - *

🟢添加搜索的查询条件

+ *

添加搜索的查询条件

* * @param root ROOT * @param builder 参数构造器 @@ -565,9 +564,9 @@ public class RootService, R extends RootRepository> { } /** - *

🟡根据ID查询对应的实体

+ *

根据ID查询对应的实体

* - * @param id 主键ID + * @param id 主键 ID * @return 实体 * @see #getMaybeNull(long) * @see #getWithEnable(long) @@ -577,9 +576,9 @@ public class RootService, R extends RootRepository> { } /** - *

🟡根据ID查询正常启用的实体

+ *

根据ID查询正常启用的实体

* - * @param id 主键ID + * @param id 主键 ID * @return 实体 * @see #get(long) * @see #getMaybeNull(long) @@ -588,18 +587,18 @@ public class RootService, R extends RootRepository> { E entity = get(id); ServiceError.FORBIDDEN_DISABLED.when(entity.getIsDisabled(), String.format( ServiceError.FORBIDDEN_DISABLED.getMessage(), - id, reflectUtil.getDescription(getEntityClass()) + id, reflectUtil.getDescription(getEntityClass()) ) ); return entity; } /** - *

🟡根据ID查询对应的实体(可能为null)

+ *

根据ID查询对应的实体(可能为null)

* - * @param id 主键ID + * @param id 主键 ID * @return 实体 - * @apiNote 查不到返回null,不抛异常 + * @apiNote 查不到返回 null,不抛异常 * @see #get(long) */ public final @Nullable E getMaybeNull(long id) { @@ -607,7 +606,7 @@ public class RootService, R extends RootRepository> { } /** - *

🟢详情查询后置方法

+ *

详情查询后置方法

* * @param result 查到的数据 * @return 处理后的数据 @@ -617,9 +616,9 @@ public class RootService, R extends RootRepository> { } /** - *

🟡分页查询数据

+ *

分页查询数据

* - * @param queryPageRequest 请求的request对象 + * @param queryPageRequest 请求的 request 对象 * @return 分页查询列表 * @see #beforeGetPage(QueryPageRequest) * @see #afterGetPage(QueryPageResponse) @@ -636,9 +635,9 @@ public class RootService, R extends RootRepository> { } /** - *

🔴禁用指定的数据

+ *

禁用指定的数据

* - * @param id 主键ID + * @param id 主键 ID * @apiNote 不建议直接调用, 请优先使用前后置方法 * @see #beforeDisable(long) * @see #afterDisable(long) @@ -649,9 +648,9 @@ public class RootService, R extends RootRepository> { } /** - *

🔴启用指定的数据

+ *

启用指定的数据

* - * @param id 主键ID + * @param id 主键 ID * @apiNote 不建议直接调用, 请优先使用前后置方法 * @see #beforeEnable(long) * @see #afterEnable(long) @@ -662,9 +661,9 @@ public class RootService, R extends RootRepository> { } /** - *

🔴删除指定的数据

+ *

删除指定的数据

* - * @param id 主键ID + * @param id 主键 ID * @apiNote 不建议直接调用, 请优先使用前后置方法 * @see #beforeDelete(long) * @see #afterDelete(long) @@ -674,7 +673,7 @@ public class RootService, R extends RootRepository> { } /** - *

🔴更新到数据库(不触发前后置)

+ *

更新到数据库(不触发前后置)

* * @param source 原始实体 * @see #update(E) @@ -685,11 +684,11 @@ public class RootService, R extends RootRepository> { } /** - *

🔴更新到数据库(触发前后置)

+ *

更新到数据库(触发前后置)

* * @param source 原始实体 * @param withNull 是否更新空值 - * @apiNote 🔴请注意,此方法不会触发前后置 + * @apiNote 请注意,此方法不会触发前后置 * @see #update(E) * @see #updateWithNull(E) */ @@ -818,7 +817,7 @@ public class RootService, R extends RootRepository> { } /** - *

🔴更新到数据库

+ *

更新到数据库

* * @param withNull 是否更新 null 属性 * @param source 原始数据 @@ -837,7 +836,7 @@ public class RootService, R extends RootRepository> { /** *

根据ID查询对应的实体

* - * @param id 主键ID + * @param id 主键 ID * @return 实体 */ private @NotNull E getById(long id) { @@ -856,7 +855,7 @@ public class RootService, R extends RootRepository> { /** *

根据ID查询对应的实体

* - * @param id 主键ID + * @param id 主键 ID * @return 实体 * @apiNote 查不到返回null,不抛异常 */ @@ -922,11 +921,11 @@ public class RootService, R extends RootRepository> { } /** - *

🔴保存并强刷到数据库

+ *

保存并强刷到数据库

* * @param entity 保存的实体 * @return 实体ID - * @apiNote 🔴 仅供 {@link #saveToDatabase(E, boolean)} 调用 + * @apiNote 仅供 {@link #saveToDatabase(E, boolean)} 调用 */ private long saveAndFlush(@NotNull E entity) { E target = getNewInstance(); diff --git a/airpower-core/src/main/java/cn/hamm/airpower/util/AesUtil.java b/airpower-core/src/main/java/cn/hamm/airpower/util/AesUtil.java index 89b46cb..7b4ad22 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/util/AesUtil.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/util/AesUtil.java @@ -16,7 +16,7 @@ import java.security.SecureRandom; import java.util.Base64; /** - *

AES助手

+ *

AES 助手

* * @author Hamm.cn */ @@ -33,7 +33,7 @@ public class AesUtil { private static final String AES = "AES"; /** - *

AES/CBC/PKCS5Padding

+ *

AES/CBC/PKCS5Padding

*/ private static final String AES_CBC_PKCS5_PADDING = "AES/CBC/PKCS5Padding"; @@ -92,7 +92,7 @@ public class AesUtil { *

设置偏移向量

* * @param iv 偏移向量 - * @return AesUtil + * @return AesUtil */ public AesUtil setIv(String iv) { this.iv = Base64.getDecoder().decode(iv); @@ -103,7 +103,7 @@ public class AesUtil { *

设置算法

* * @param algorithm 算法 - * @return AesUtil + * @return AesUtil */ public AesUtil setAlgorithm(String algorithm) { this.algorithm = algorithm; @@ -114,7 +114,7 @@ public class AesUtil { *

设置密钥

* * @param key 密钥 - * @return AesUtil + * @return AesUtil */ public AesUtil setKey(String key) { this.key = Base64.getDecoder().decode(key); @@ -151,10 +151,10 @@ public class AesUtil { } /** - *

获取Cipher

+ *

获取 Cipher

* * @param mode 模式 - * @return Cipher + * @return Cipher */ private @NotNull Cipher getCipher(int mode) { try { diff --git a/airpower-core/src/main/java/cn/hamm/airpower/util/CollectionUtil.java b/airpower-core/src/main/java/cn/hamm/airpower/util/CollectionUtil.java index c2c5707..0cb51c7 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/util/CollectionUtil.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/util/CollectionUtil.java @@ -13,7 +13,7 @@ import java.util.*; @Component public class CollectionUtil { /** - *

获取集合中的非null元素

+ *

获取集合中的非 null 元素

* * @param list 原始集合 * @param fieldClass 数据类型 diff --git a/airpower-core/src/main/java/cn/hamm/airpower/util/CookieUtil.java b/airpower-core/src/main/java/cn/hamm/airpower/util/CookieUtil.java index 5c0f556..ec4fd5c 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/util/CookieUtil.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/util/CookieUtil.java @@ -7,18 +7,18 @@ import org.jetbrains.annotations.NotNull; import org.springframework.stereotype.Component; /** - *

Cookie助手

+ *

Cookie 助手

* * @author Hamm.cn */ @Component public class CookieUtil { /** - *

获取一个Cookie

+ *

获取一个 Cookie

* * @param key Key * @param value Value - * @return Cookie + * @return Cookie * @see CookieConfig */ public final @NotNull Cookie getCookie(String key, String value) { @@ -31,10 +31,10 @@ public class CookieUtil { } /** - *

获取一个身份验证的Cookie

+ *

获取一个身份验证的 Cookie

* * @param value 身份串的值 - * @return Cookie + * @return Cookie * @see CookieConfig */ public final @NotNull Cookie getAuthorizeCookie(String value) { diff --git a/airpower-core/src/main/java/cn/hamm/airpower/util/DictionaryUtil.java b/airpower-core/src/main/java/cn/hamm/airpower/util/DictionaryUtil.java index deef87b..c691607 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/util/DictionaryUtil.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/util/DictionaryUtil.java @@ -59,7 +59,7 @@ public class DictionaryUtil { } /** - *

获取指定枚举类的ListMap数据

+ *

获取指定枚举类的 ListMap 数据

* * @param clazz 枚举类 * @return ListMap @@ -69,7 +69,7 @@ public class DictionaryUtil { } /** - *

获取指定枚举类的ListMap数据

+ *

获取指定枚举类的 ListMap 数据

* * @param clazz 枚举字典类 * @param lambdas 需要获取的方法表达式 diff --git a/airpower-core/src/main/java/cn/hamm/airpower/util/HttpUtil.java b/airpower-core/src/main/java/cn/hamm/airpower/util/HttpUtil.java index ecf0a3b..95f6efe 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/util/HttpUtil.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/util/HttpUtil.java @@ -59,11 +59,11 @@ public class HttpUtil { private int connectTimeout = 5; /** - *

添加Cookie

+ *

添加 Cookie

* * @param key Key * @param value Value - * @return HttpUtil + * @return HttpUtil */ @Contract("_, _ -> this") public final HttpUtil addCookie(String key, String value) { @@ -72,9 +72,9 @@ public class HttpUtil { } /** - *

发送POST请求

+ *

发送 POST 请求

* - * @return HttpResponse + * @return HttpResponse */ public final HttpResponse post() { method = HttpMethod.POST; @@ -82,10 +82,10 @@ public class HttpUtil { } /** - *

发送POST请求

+ *

发送 POST 请求

* * @param body 请求体 - * @return HttpResponse + * @return HttpResponse */ public final HttpResponse post(String body) { method = HttpMethod.POST; @@ -96,7 +96,7 @@ public class HttpUtil { /** *

发送GET请求

* - * @return HttpResponse + * @return HttpResponse */ public final HttpResponse get() { method = HttpMethod.GET; @@ -106,7 +106,7 @@ public class HttpUtil { /** *

发送请求

* - * @return HttpResponse + * @return HttpResponse */ public final HttpResponse send() { try { @@ -117,9 +117,9 @@ public class HttpUtil { } /** - *

获取HttpRequest对象

+ *

获取 HttpRequest 对象

* - * @return HttpRequest + * @return HttpRequest */ private HttpRequest getHttpRequest() { HttpRequest.Builder requestBuilder = HttpRequest.newBuilder() @@ -146,9 +146,9 @@ public class HttpUtil { } /** - *

获取HttpClient

+ *

获取 HttpClient

* - * @return HttpClient + * @return HttpClient */ private HttpClient getHttpClient() { HttpClient.Builder httpClientBuilder = HttpClient.newBuilder(); @@ -159,11 +159,11 @@ public class HttpUtil { } /** - *

添加Header

+ *

添加 Header

* * @param key Key * @param value Value - * @return HttpUtil + * @return HttpUtil */ @Contract("_, _ -> this") public final HttpUtil addHeader(String key, Object value) { diff --git a/airpower-core/src/main/java/cn/hamm/airpower/util/MqttUtil.java b/airpower-core/src/main/java/cn/hamm/airpower/util/MqttUtil.java index 70cf384..70a583d 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/util/MqttUtil.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/util/MqttUtil.java @@ -11,7 +11,7 @@ import org.springframework.context.annotation.Configuration; import java.util.UUID; /** - *

MQTT助手类

+ *

MQTT 助手类

* * @author Hamm.cn */ @@ -20,7 +20,7 @@ import java.util.UUID; public class MqttUtil { /** - *

创建MQTT客户端

+ *

创建 MQTT 客户端

* * @return 配置 * @throws MqttException 异常 @@ -30,9 +30,9 @@ public class MqttUtil { } /** - *

创建MQTT客户端

+ *

创建 MQTT 客户端

* - * @param id 客户端ID + * @param id 客户端 ID * @return 配置 * @throws MqttException 异常 */ diff --git a/airpower-core/src/main/java/cn/hamm/airpower/util/PasswordUtil.java b/airpower-core/src/main/java/cn/hamm/airpower/util/PasswordUtil.java index 8c5c7d0..866c9f7 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/util/PasswordUtil.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/util/PasswordUtil.java @@ -18,7 +18,7 @@ public class PasswordUtil { * * @param password 明文密码 * @param salt 盐 - * @return sha1散列摘要 + * @return sha1 散列摘要 */ public @NotNull String encode(@NotNull String password, @NotNull String salt) { ServiceError.PARAM_MISSING.whenEmpty(password, MessageConstant.PASSWORD_CAN_NOT_BE_NULL); diff --git a/airpower-core/src/main/java/cn/hamm/airpower/util/RedisUtil.java b/airpower-core/src/main/java/cn/hamm/airpower/util/RedisUtil.java index c516808..5c941a1 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/util/RedisUtil.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/util/RedisUtil.java @@ -19,7 +19,7 @@ import java.util.Set; import java.util.concurrent.TimeUnit; /** - *

Redis封装类

+ *

Redis 封装类

* * @author Hamm.cn */ @@ -51,7 +51,7 @@ public class RedisUtil { /** *

从缓存中获取实体

* - * @param key 缓存的Key + * @param key 缓存的 Key * @param entity 实体 * @return 缓存的实体 */ @@ -99,7 +99,7 @@ public class RedisUtil { /** *

缓存实体

* - * @param key 缓存的Key + * @param key 缓存的 Key * @param entity 实体 */ public final > void saveEntity(String key, E entity) { @@ -109,7 +109,7 @@ public class RedisUtil { /** *

缓存实体

* - * @param key 缓存的Key + * @param key 缓存的 Key * @param entity 实体 * @param second 缓存时间(秒) */ @@ -120,7 +120,7 @@ public class RedisUtil { /** *

指定缓存失效时间

* - * @param key 缓存的Key + * @param key 缓存的 Key * @param second 缓存时间(秒) */ public final void setExpireSecond(String key, long second) { @@ -154,7 +154,7 @@ public class RedisUtil { /** *

获取过期时间

* - * @param key 缓存的Key + * @param key 缓存的 Key * @return 过期时间 */ public final long getExpireSecond(String key) { @@ -171,7 +171,7 @@ public class RedisUtil { /** *

判断key是否存在

* - * @param key 缓存的Key + * @param key 缓存的 Key * @return true 存在; false 不存在 */ public final boolean hasKey(String key) { @@ -186,7 +186,7 @@ public class RedisUtil { /** *

删除缓存

* - * @param key 缓存的Key + * @param key 缓存的 Key */ public final void del(String key) { try { @@ -200,7 +200,7 @@ public class RedisUtil { /** *

普通缓存获取

* - * @param key 缓存的Key + * @param key 缓存的 Key * @return 值 */ public final @Nullable Object get(String key) { @@ -216,7 +216,7 @@ public class RedisUtil { /** *

普通缓存放入

* - * @param key 键 + * @param key 缓存的 Key * @param value 值 */ public final void set(String key, Object value) { @@ -226,7 +226,7 @@ public class RedisUtil { /** *

普通缓存放入并设置时间

* - * @param key 缓存的Key + * @param key 缓存的 Key * @param value 缓存的值 * @param second 缓存时间(秒) * @apiNote time要大于0 如果time小于等于0 将设置无限期 @@ -257,7 +257,7 @@ public class RedisUtil { } /** - *

获取缓存Entity的cacheKey

+ *

获取缓存 EntitycacheKey

* * @param entity 实体 * @return key diff --git a/airpower-core/src/main/java/cn/hamm/airpower/util/ReflectUtil.java b/airpower-core/src/main/java/cn/hamm/airpower/util/ReflectUtil.java index 450e1a8..3205ac4 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/util/ReflectUtil.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/util/ReflectUtil.java @@ -213,7 +213,7 @@ public class ReflectUtil { } /** - *

是否是继承自BaseEntity

+ *

是否是继承自 RootEntity

* * @param clazz 类 * @return 布尔 @@ -229,7 +229,7 @@ public class ReflectUtil { } /** - *

是否是继承自BaseModel

+ *

是否是继承自 RootModel

* * @param clazz 类 * @return 布尔 @@ -283,7 +283,7 @@ public class ReflectUtil { } /** - *

获取Lambda的Function表达式的函数名

+ *

获取 LambdaFunction 表达式的函数名

* * @param lambda 表达式 * @return 函数名 @@ -295,7 +295,7 @@ public class ReflectUtil { } /** - *

获取Lambda的Function类的函数名

+ *

获取 LambdaFunction 类的函数名

* * @param lambda 表达式 * @return 类名 @@ -307,10 +307,10 @@ public class ReflectUtil { } /** - *

获取一个SerializedLambda

+ *

获取一个 SerializedLambda

* * @param lambda 表达式 - * @return SerializedLambda + * @return SerializedLambda */ private SerializedLambda getSerializedLambda(@NotNull IFunction lambda) { try { diff --git a/airpower-core/src/main/java/cn/hamm/airpower/util/RsaUtil.java b/airpower-core/src/main/java/cn/hamm/airpower/util/RsaUtil.java index 0e9b218..f55153d 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/util/RsaUtil.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/util/RsaUtil.java @@ -18,7 +18,7 @@ import java.security.spec.X509EncodedKeySpec; import java.util.Base64; /** - *

RSA加解密助手类

+ *

RSA 加解密助手类

* * @author Hamm.cn */ @@ -27,7 +27,7 @@ import java.util.Base64; @Component public class RsaUtil { /** - *

加密算法KEY长度

+ *

加密算法 KEY 长度

*/ private final int CRYPT_KEY_SIZE = 2048; /** @@ -182,9 +182,9 @@ public class RsaUtil { } /** - *

RSA处理方法

+ *

RSA 处理方法

* - * @param cipher RSA实例 + * @param cipher RSA 实例 * @param sourceBytes 加解密原始数据 * @param blockSize 分片大小 * @return 加解密结果 @@ -210,9 +210,9 @@ public class RsaUtil { } /** - *

生成RSA密钥对

+ *

生成 RSA 密钥对

* - * @return KeyPair + * @return KeyPair */ public final KeyPair generateKeyPair() throws NoSuchAlgorithmException { KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(CRYPT_METHOD); @@ -221,10 +221,10 @@ public class RsaUtil { } /** - *

将公钥转换为PEM格式

+ *

将公钥转换为 PEM 格式

* * @param publicKey 公钥 - * @return PEM + * @return PEM */ public final @NotNull String convertPublicKeyToPem(@NotNull PublicKey publicKey) { byte[] encoded = publicKey.getEncoded(); @@ -235,10 +235,10 @@ public class RsaUtil { } /** - *

将私钥转换为PEM格式

+ *

将私钥转换为 PEM 格式

* * @param privateKey 私钥 - * @return PEM + * @return PEM */ public final @NotNull String convertPrivateKeyToPem(@NotNull PrivateKey privateKey) { byte[] encoded = privateKey.getEncoded(); @@ -249,9 +249,9 @@ public class RsaUtil { } /** - *

将Base64编码的文本换行

+ *

Base64 编码的文本换行

* - * @param base64Text 原始Base64 + * @param base64Text 原始 Base64 * @return 换行后的 */ private @NotNull String wrapBase64Text(@NotNull String base64Text) { diff --git a/airpower-core/src/main/java/cn/hamm/airpower/util/SecurityUtil.java b/airpower-core/src/main/java/cn/hamm/airpower/util/SecurityUtil.java index e5f0a70..cdc0883 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/util/SecurityUtil.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/util/SecurityUtil.java @@ -13,9 +13,9 @@ import org.springframework.stereotype.Component; @Component public class SecurityUtil { /** - *

从AccessToken中获取ID

+ *

AccessToken 中获取 ID

* - * @param accessToken accessToken + * @param accessToken AccessToken */ public final long getIdFromAccessToken(String accessToken) { ServiceError.UNAUTHORIZED.whenNull(accessToken); @@ -27,10 +27,10 @@ public class SecurityUtil { } /** - *

创建一个AccessToken

+ *

创建一个 AccessToken

* - * @param id TokenID - * @return AccessToken + * @param id TokenID + * @return AccessToken */ public final String createAccessToken(Long id) { return Utils.getTokenUtil().addPayload(Constant.ID, id) diff --git a/airpower-core/src/main/java/cn/hamm/airpower/util/StringUtil.java b/airpower-core/src/main/java/cn/hamm/airpower/util/StringUtil.java index 1e93e34..9033bde 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/util/StringUtil.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/util/StringUtil.java @@ -17,7 +17,7 @@ import java.util.stream.IntStream; @Component public class StringUtil { /** - *

IPV4的块长度

+ *

IPV4 的块长度

*/ private static final int IPV4_PART_COUNT = 4; @@ -49,11 +49,11 @@ public class StringUtil { } /** - *

IPv4地址脱敏

+ *

IPv4 地址脱敏

* - * @param ipv4 IPv4地址 + * @param ipv4 IPv4 地址 * @param symbol 符号 - * @return 脱敏后的IPv4地址 + * @return 脱敏后的 IPv4 地址 */ public final @NotNull String desensitizeIpv4Address(@NotNull String ipv4, String symbol) { if (!StringUtils.hasText(symbol)) { @@ -69,10 +69,10 @@ public class StringUtil { } /** - *

IPv4地址脱敏

+ *

IPv4 地址脱敏

* - * @param ipv4 IPv4地址 - * @return 脱敏后的IPv4地址 + * @param ipv4 IPv4 地址 + * @return 脱敏后的 IPv4 地址 */ public final @NotNull String desensitizeIpv4Address(@NotNull String ipv4) { return desensitizeIpv4Address(ipv4, Constant.ASTERISK); diff --git a/airpower-core/src/main/java/cn/hamm/airpower/util/TaskUtil.java b/airpower-core/src/main/java/cn/hamm/airpower/util/TaskUtil.java index fc4adae..b567d22 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/util/TaskUtil.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/util/TaskUtil.java @@ -17,7 +17,7 @@ import java.util.List; @Component public class TaskUtil { /** - *

执行任务(不会抛出异常)

+ *

执行任务不会抛出异常

* * @param runnable 任务 * @param moreRunnable 更多任务 @@ -34,7 +34,7 @@ public class TaskUtil { } /** - *

异步执行任务(不会抛出异常)

+ *

异步执行任务不会抛出异常

* * @param runnable 任务 * @param moreRunnable 更多任务 diff --git a/airpower-core/src/main/java/cn/hamm/airpower/util/TokenUtil.java b/airpower-core/src/main/java/cn/hamm/airpower/util/TokenUtil.java index 8a9232f..d19759e 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/util/TokenUtil.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/util/TokenUtil.java @@ -20,7 +20,7 @@ import java.util.HashMap; import java.util.Map; /** - *

TokenUtil

+ *

TokenUtil

* * @author Hamm.cn */ @@ -43,17 +43,17 @@ public class TokenUtil { private static final String PAYLOADS_IS_EMPTY = "没有任何负载数据"; /** - *

HMAC-SHA-256错误

+ *

HMAC-SHA-256错误

*/ private static final String HMAC_SHA_256_ERROR = "HMAC-SHA-256发生错误"; /** - *

Token由3部分组成

+ *

Token3 部分组成

*/ private static final int TOKEN_PART_COUNT = 3; /** - *

验证后的Token

+ *

验证后的 Token

*/ private final VerifiedToken verifiedToken; @@ -63,10 +63,10 @@ public class TokenUtil { } /** - *

创建Token

+ *

创建 Token

* * @param secret 密钥 - * @return AccessToken + * @return AccessToken */ public final String create(String secret) { ServiceError.PARAM_INVALID.whenEquals(Constant.AIRPOWER, secret, "身份令牌创建失败,请在环境变量配置 airpower.accessTokenSecret"); @@ -81,9 +81,9 @@ public class TokenUtil { /** *

添加负载

* - * @param key 负载的Key - * @param value 负载的Value - * @return TokenUtil + * @param key 负载的 Key + * @param value 负载的 Value + * @return TokenUtil */ @Contract("_, _ -> this") public final TokenUtil addPayload(String key, Object value) { @@ -94,8 +94,8 @@ public class TokenUtil { /** *

移除负载

* - * @param key 负载Key - * @return TokenUtil + * @param key 负载 Key + * @return TokenUtil */ @Contract("_ -> this") public final TokenUtil removePayload(String key) { @@ -107,7 +107,7 @@ public class TokenUtil { *

设置过期时间(毫秒)

* * @param millisecond 过期毫秒 - * @return TokenUtil + * @return TokenUtil */ @Contract("_ -> this") public final TokenUtil setExpireMillisecond(long millisecond) { @@ -119,11 +119,11 @@ public class TokenUtil { } /** - *

验证AccessToken并返回一个已验证的Token

+ *

验证 AccessToken 并返回一个已验证的 Token

* - * @param accessToken AccessToken + * @param accessToken AccessToken * @param secret 密钥 - * @return VerifiedToken + * @return VerifiedToken */ public final VerifiedToken verify(@NotNull String accessToken, String secret) { String source; @@ -152,7 +152,7 @@ public class TokenUtil { } /** - *

HMacSha256

+ *

HMacSha256

* * @param secret 密钥 * @param content 数据 @@ -195,8 +195,8 @@ public class TokenUtil { /** *

获取负载

* - * @param key 负载的Key - * @return 负载的Value + * @param key 负载的 Key + * @return 负载的 Value */ public final @Nullable Object getPayload(String key) { return payloads.get(key); diff --git a/airpower-core/src/main/java/cn/hamm/airpower/util/TreeUtil.java b/airpower-core/src/main/java/cn/hamm/airpower/util/TreeUtil.java index 351f81f..6fe0f7e 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/util/TreeUtil.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/util/TreeUtil.java @@ -29,7 +29,7 @@ public class TreeUtil { *

生成树结构

* * @param list 原始数据列表 - * @param parentId 父级ID + * @param parentId 父级 ID * @param 泛型 * @return 数结构数组 */ diff --git a/airpower-core/src/main/java/cn/hamm/airpower/util/Utils.java b/airpower-core/src/main/java/cn/hamm/airpower/util/Utils.java index c0bc63a..52f3c61 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/util/Utils.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/util/Utils.java @@ -12,14 +12,14 @@ import org.springframework.core.env.Environment; import org.springframework.stereotype.Component; /** - *

AirPower工具包

+ *

AirPower 工具包

* * @author Hamm.cn */ @Component public class Utils { /** - *

Redis工具类

+ *

Redis 工具类

*/ @Getter private static RedisUtil redisUtil; @@ -49,19 +49,19 @@ public class Utils { private static SecurityUtil securityUtil; /** - *

RSA工具类

+ *

RSA 工具类

*/ @Getter private static RsaUtil rsaUtil; /** - *

Cookie工具类

+ *

Cookie 工具类

*/ @Getter private static CookieUtil cookieUtil; /** - *

MQTT工具类

+ *

MQTT 工具类

*/ @Getter private static MqttUtil mqttUtil; @@ -121,7 +121,7 @@ public class Utils { private static Environment environment; /** - *

JPA实体管理器

+ *

JPA 实体管理器

*/ @Getter private static EntityManager entityManager; @@ -139,7 +139,7 @@ public class Utils { private static HttpServletResponse response; /** - *

WebSocket工具类

+ *

WebSocket 工具类

*/ @Getter private static WebsocketUtil websocketUtil; @@ -157,7 +157,7 @@ public class Utils { private static StringUtil stringUtil; /** - *

AES工具

+ *

AES 工具

*/ @Getter private static AesUtil aesUtil; diff --git a/airpower-core/src/main/java/cn/hamm/airpower/util/ValidateUtil.java b/airpower-core/src/main/java/cn/hamm/airpower/util/ValidateUtil.java index 950a8ea..69af335 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/util/ValidateUtil.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/util/ValidateUtil.java @@ -120,7 +120,7 @@ public class ValidateUtil { *

是否是普通字符

* 允许字符: *

- * > @ # % a-z A-Z 0-9 汉字 _ + / + * @ # % a-z A-Z 0-9 汉字 _ + / *

* * @param value 参数 @@ -176,7 +176,7 @@ public class ValidateUtil { *

验证传入的数据模型

* * @param model 数据模型 - * @param actions (可选)校验分组 + * @param actions 可选 校验分组 * @param 模型类型 */ public final > void valid(M model, Class... actions) { diff --git a/airpower-core/src/main/java/cn/hamm/airpower/websocket/WebSocketEvent.java b/airpower-core/src/main/java/cn/hamm/airpower/websocket/WebSocketEvent.java index 114e6ab..fae8862 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/websocket/WebSocketEvent.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/websocket/WebSocketEvent.java @@ -11,7 +11,7 @@ import java.util.Base64; import java.util.concurrent.atomic.AtomicLong; /** - *

WebSocket事件

+ *

WebSocket 事件

* * @author Hamm.cn */ @@ -19,22 +19,22 @@ import java.util.concurrent.atomic.AtomicLong; @Accessors(chain = true) public class WebSocketEvent { /** - *

当前事件ID

+ *

当前事件 ID

*/ private static final AtomicLong CURRENT_EVENT_ID = new AtomicLong(Constant.ZERO_LONG); /** - *

事件ID

+ *

事件 ID

*/ private String id; /** - *

发送方ID

+ *

发送方 ID

*/ private long from = Constant.ZERO_LONG; /** - *

接收方ID

+ *

接收方 ID

*/ private long to = Constant.ZERO_LONG; @@ -49,21 +49,7 @@ public class WebSocketEvent { private WebSocketPayload payload; /** - *

重置事件的ID和事件

- */ - protected final void resetEvent() { - long time = System.currentTimeMillis(); - this.time = time; - this.id = Base64.getEncoder().encodeToString((String.format( - "%s-%s-%s", - Configs.getServiceConfig().getServiceId(), - CURRENT_EVENT_ID.incrementAndGet(), - time - )).getBytes(StandardCharsets.UTF_8)); - } - - /** - *

创建WebSocket事件

+ *

创建 WebSocket 事件

* * @param payload 负载 * @return 事件 @@ -73,7 +59,7 @@ public class WebSocketEvent { } /** - *

创建WebSocket事件

+ *

创建 WebSocket 事件

* * @return 事件 */ @@ -82,4 +68,18 @@ public class WebSocketEvent { webSocketEvent.resetEvent(); return webSocketEvent; } + + /** + *

重置事件的 ID 和事件

+ */ + protected final void resetEvent() { + long time = System.currentTimeMillis(); + this.time = time; + this.id = Base64.getEncoder().encodeToString((String.format( + "%s-%s-%s", + Configs.getServiceConfig().getServiceId(), + CURRENT_EVENT_ID.incrementAndGet(), + time + )).getBytes(StandardCharsets.UTF_8)); + } } \ No newline at end of file diff --git a/airpower-core/src/main/java/cn/hamm/airpower/websocket/WebSocketHandler.java b/airpower-core/src/main/java/cn/hamm/airpower/websocket/WebSocketHandler.java index 2e61795..e2471ef 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/websocket/WebSocketHandler.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/websocket/WebSocketHandler.java @@ -42,28 +42,28 @@ public class WebSocketHandler extends TextWebSocketHandler implements MessageLis public static final String CHANNEL_USER_PREFIX = "WEBSOCKET_USER_"; /** - *

Redis连接Map

+ *

Redis 连接列表

*/ protected final ConcurrentHashMap redisConnectionHashMap = new ConcurrentHashMap<>(); /** - *

MQTT客户端Map

+ *

MQTT 客户端列表

*/ protected final ConcurrentHashMap mqttClientHashMap = new ConcurrentHashMap<>(); /** - *

用户IDMap

+ *

用户 ID 列表

*/ protected final ConcurrentHashMap userIdHashMap = new ConcurrentHashMap<>(); /** - *

Redis连接工厂

+ *

Redis 连接工厂

*/ @Autowired private RedisConnectionFactory redisConnectionFactory; /** - *

收到Websocket消息时

+ *

收到 Websocket 消息时

* * @param session 会话 * @param textMessage 文本消息 @@ -88,7 +88,7 @@ public class WebSocketHandler extends TextWebSocketHandler implements MessageLis } /** - *

发送Websocket事件负载

+ *

发送 Websocket 事件负载

* * @param session 会话 * @param webSocketPayload 事件负载 @@ -102,7 +102,7 @@ public class WebSocketHandler extends TextWebSocketHandler implements MessageLis } /** - *

当WebSocket负载到达时

+ *

WebSocket 负载到达时

* * @param webSocketPayload 负载对象 */ @@ -152,10 +152,10 @@ public class WebSocketHandler extends TextWebSocketHandler implements MessageLis } /** - *

开始监听Redis消息

+ *

开始监听 Redis 消息

* - * @param session WebSocket会话 - * @param userId 用户ID + * @param session WebSocket 会话 + * @param userId 用户 ID */ private void startRedisListener(@NotNull WebSocketSession session, long userId) { final String personalChannel = getRealChannel(CHANNEL_USER_PREFIX + userId); @@ -173,10 +173,10 @@ public class WebSocketHandler extends TextWebSocketHandler implements MessageLis } /** - *

开始监听MQTT消息

+ *

开始监听 MQTT 消息

* - * @param session WebSocket会话 - * @param userId 用户ID + * @param session WebSocket 会话 + * @param userId 用户 ID */ private void startMqttListener(@NotNull WebSocketSession session, long userId) { try (MqttClient mqttClient = Utils.getMqttUtil().createClient()) { @@ -245,10 +245,10 @@ public class WebSocketHandler extends TextWebSocketHandler implements MessageLis } /** - *

REDIS订阅

+ *

REDIS 订阅

* * @param channel 传入的频道 - * @param session WebSocket会话 + * @param session WebSocket 会话 */ protected final void redisSubscribe(@NotNull String channel, WebSocketSession session) { log.info("REDIS开始订阅频道: {}", getRealChannel(channel)); @@ -256,10 +256,10 @@ public class WebSocketHandler extends TextWebSocketHandler implements MessageLis } /** - *

MQTT订阅

+ *

MQTT 订阅

* * @param channel 传入的频道 - * @param session WebSocket会话 + * @param session WebSocket 会话 */ protected final void mqttSubscribe(String channel, WebSocketSession session) { log.info("MQTT开始订阅频道: {}", getRealChannel(channel)); @@ -281,10 +281,10 @@ public class WebSocketHandler extends TextWebSocketHandler implements MessageLis } /** - *

Redis订阅

+ *

Redis 取消订阅

* * @param channel 传入的频道 - * @param session WebSocket会话 + * @param session WebSocket 会话 */ protected final void redisUnSubscribe(@NotNull String channel, WebSocketSession session) { log.info("REDIS取消订阅频道: {}", getRealChannel(channel)); @@ -292,10 +292,10 @@ public class WebSocketHandler extends TextWebSocketHandler implements MessageLis } /** - *

MQTT订阅

+ *

MQTT 取消订阅

* * @param channel 传入的频道 - * @param session WebSocket会话 + * @param session WebSocket 会话 */ protected final void mqttUnSubscribe(String channel, WebSocketSession session) { log.info("MQTT取消订阅频道: {}", getRealChannel(channel)); @@ -307,10 +307,10 @@ public class WebSocketHandler extends TextWebSocketHandler implements MessageLis } /** - *

获取MQTT客户端

+ *

获取 MQTT 客户端

* - * @param session WebSocket会话 - * @return MQTT客户端 + * @param session WebSocket 会话 + * @return MQTT 客户端 */ protected final MqttClient getMqttClient(@NotNull WebSocketSession session) { MqttClient mqttClient = mqttClientHashMap.get(session.getId()); @@ -321,10 +321,10 @@ public class WebSocketHandler extends TextWebSocketHandler implements MessageLis } /** - *

获取Redis订阅

+ *

获取 Redis 订阅

* - * @param session WebSocket会话 - * @return Redis订阅 + * @param session WebSocket 会话 + * @return Redis 订阅 */ protected final Subscription getRedisSubscription(@NotNull WebSocketSession session) { RedisConnection redisConnection = redisConnectionHashMap.get(session.getId()); diff --git a/airpower-core/src/main/java/cn/hamm/airpower/websocket/WebSocketPayload.java b/airpower-core/src/main/java/cn/hamm/airpower/websocket/WebSocketPayload.java index 28ed92d..4e17aa0 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/websocket/WebSocketPayload.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/websocket/WebSocketPayload.java @@ -4,7 +4,7 @@ import lombok.Data; import lombok.experimental.Accessors; /** - *

WebSocket事件负载

+ *

WebSocket 事件负载

* * @author Hamm.cn */ diff --git a/airpower-core/src/main/java/cn/hamm/airpower/websocket/WebSocketSupport.java b/airpower-core/src/main/java/cn/hamm/airpower/websocket/WebSocketSupport.java index 1f0a905..5179ccf 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/websocket/WebSocketSupport.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/websocket/WebSocketSupport.java @@ -1,18 +1,18 @@ package cn.hamm.airpower.websocket; /** - *

WebSocket支持

+ *

WebSocket 支持

* * @author Hamm.cn */ public enum WebSocketSupport { /** - *

Redis

+ *

Redis

*/ REDIS, /** - *

MQTT

+ *

MQTT

*/ MQTT, diff --git a/airpower-core/src/main/java/cn/hamm/airpower/websocket/WebsocketUtil.java b/airpower-core/src/main/java/cn/hamm/airpower/websocket/WebsocketUtil.java index 5c08956..692f7ec 100644 --- a/airpower-core/src/main/java/cn/hamm/airpower/websocket/WebsocketUtil.java +++ b/airpower-core/src/main/java/cn/hamm/airpower/websocket/WebsocketUtil.java @@ -32,7 +32,7 @@ public class WebsocketUtil { /** *

发布事件负载到指定的用户

* - * @param userId 目标用户ID + * @param userId 目标用户 ID * @param payload 事件负载 */ public final void publishToUser(long userId, WebSocketPayload payload) { -- Gitee From 1049cdb7d3283e5720df81dad8deb767f8f62165 Mon Sep 17 00:00:00 2001 From: Hamm Date: Sun, 7 Jul 2024 00:42:14 +0800 Subject: [PATCH 2/2] =?UTF-8?q?release(v2.2.0):=20=E5=8F=91=E5=B8=83`v2.2.?= =?UTF-8?q?0`=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Hamm --- airpower-core/pom.xml | 4 ++-- pom.xml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/airpower-core/pom.xml b/airpower-core/pom.xml index c4ba4c2..1f535f6 100644 --- a/airpower-core/pom.xml +++ b/airpower-core/pom.xml @@ -5,10 +5,10 @@ cn.hamm airpower - 2.1.3 + 2.2.0 airpower-core - 2.1.3 + 2.2.0 airpower-core AirPower is a fast backend development tool based on SpringBoot3 and JPA. It's the core of AirPower. diff --git a/pom.xml b/pom.xml index 664c7e8..e36740f 100644 --- a/pom.xml +++ b/pom.xml @@ -4,11 +4,11 @@ 4.0.0 cn.hamm airpower - 2.1.3 + 2.2.0 airpower AirPower is a fast backend development tool based on SpringBoot3 and JPA. - 2.1.3 + 2.2.0 UTF-8 UTF-8 UTF-8 -- Gitee