diff --git a/airpower-core/pom.xml b/airpower-core/pom.xml
index c4ba4c29da6d3a2ecf332c2932d22a700a5f4555..1f535f61d478310374ee0c28ba5c71286c522484 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/airpower-core/src/main/java/cn/hamm/airpower/AbstractWebConfig.java b/airpower-core/src/main/java/cn/hamm/airpower/AbstractWebConfig.java
index b1f0a08ad2590baa36654e1fde05bc3ae9b85876..b7a3301c0f1a9077d969464eb9c0970adf93dfba 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 d6b6752d53d0b9e8bbc6a0d8f3df45b361cf712e..fa9e438a2d1c0d90c68fe80fa36a4fee064b0013 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 c49402671bee7ef36489d32999aab5edccd8fe41..78b19e75f8a8aa87f9ee2f84650af04fe814ee6b 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 96a23c0d3ab3e3751c6714d87f4ed9022e07b537..14109fe625dd9e500d5e3b9cbb87b86c879b726b 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 be89e6224c6876633934d7f4b8496ff81100b579..85fe7e738462b2b2b6938b334acbc0c3026e466f 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 629f249962881fa1fc99a85f960dee16e4c6fcb2..15082b735ef30dc82ab80be6c8750be29b1c1d27 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 8babbe707092514c24e04c3f92e580a585612186..5090f564fea06abf6743c5930606a26ef60556ef 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 bf229a3d921d9a3f8d41e69f1094bd488c6f0315..ab7c9f7b647822602d685e99580007baa881791c 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配置
+ * Cookie
的 HttpOnly
配置
*/
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 b4e17c05306e377e087a7ce2880d454538331d7f..99ff655c1dfa3f85eb3933fa934a0cf6cc2e7250 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 f281ff5c9ea88c9bdc6985d76813c6169805c2a2..fd2d7040c47efab315bf63474377890628df0d21 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
+ * 身份令牌 header
的 key
*/
private String authorizeHeader = HttpHeaders.AUTHORIZATION;
@@ -79,7 +79,7 @@ public class ServiceConfig {
private long authorizeExpireSecond = Constant.SECOND_PER_DAY;
/**
- * 多租户的header的key
+ * 多租户的 header
的 key
*/
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 a7c3c5822520bf1f14763c5b3862fcfac365da60..9bc65b9036baaf8a38261b471477dbdb950117a7 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 3a4af0a25cb8c133ca668250af0c590cb2f6c554..31115ce561a6177ff0cd2dc38ef85691cf3fa701 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 30e784a0fc60d61a446ecc0d30cb1ed828730d44..6c6b0cbebfcee517e527e9904f4f624a165e732f 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 a245f80230040816648fe150b7162de58d2eab71..101d0c15c2ee572dc7c3cf6754738946378dd982 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 f0b88f970f8d6d9f3b218fd48470f65d36037363..95072eaa26acbe4ce1f4f28e20b8b6eb4bc96e7c 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 715ba7757f11bec41f42a7535ea358f24207e1f0..935710a41151857a94696712c5a111bbd5fe2265 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 6b4c67b4a8cb1ec214868e6ccc335f4cf2ef59c5..8fd4525c49ac48ad194ba44ec8913235fc5d3f61 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 9335e41dc429ce04ac8c06d4b46de1577712880b..f7fb1dc47e6173da7a8466f644bb8fd032da4bb5 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 908d6cfb52f7d085f4fd52039a2c42978138112d..1bcd5bb10173519ed3846eac3c01ba3e39bab7ba 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 ad80deaa84cd97c4e7d512ceafc334694ce369df..c717d695f50587ad8c2f50146fbc793ab83a9c4b 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 25bfff576453af169842be5ca219c39571a38ac8..2bae5c93d2cfd42c7e483b5308908527f7ff047c 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 04935aaa909fa22f077466561dfaa8fc818e45d6..02c7c22d81afaa0c5d2ccb21b54550a7b4ac7499 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