diff --git a/aos-common/src/main/java/com/aos/common/copy/AosBeanUtils.java b/aos-common/src/main/java/com/aos/common/copy/AosBeanUtils.java index 4c9f44b..b365040 100644 --- a/aos-common/src/main/java/com/aos/common/copy/AosBeanUtils.java +++ b/aos-common/src/main/java/com/aos/common/copy/AosBeanUtils.java @@ -9,17 +9,9 @@ import java.util.function.BiConsumer; import java.util.function.Supplier; /** - *
Company: 成都返空汇网络技术有限公司
- *Description:
- * - * @author yangjiyu - * @version 1.0.0 - * @email "mailto:yangjiyu@fkhwl.com" - * @date 2022.11.17 17:08 * @author: wangyl - * @date: 2022 /11/6 + * @date: 2022/11/6 * @description: 拷贝 - * @since 1.0 */ @SuppressWarnings("unchecked") public class AosBeanUtils extends BeanUtils { @@ -27,15 +19,12 @@ public class AosBeanUtils extends BeanUtils { /** * list拷贝 * - * @paramCompany: 成都返空汇网络技术有限公司
- *Description:
- * - * @author yangjiyu - * @version 1.0.0 - * @email "mailto:yangjiyu@fkhwl.com" - * @date 2022.11.17 17:08 * @author: wangyl - * @date: 2022 /11/16 + * @date: 2022/11/16 * @description: 枚举基础接口 - * @since 1.0 */ public interface AosBaseEnum { /** * 获取枚举值 * * @param - * @return java.lang.Integer value - * @Date 2022 /11/16 + * @return java.lang.Integer + * @Date 2022/11/16 * @Author wangyl - * @since 1.0 */ Integer getValue(); @@ -29,10 +20,9 @@ public interface AosBaseEnum { * 获取枚举描述 * * @param - * @return java.lang.String desc - * @Date 2022 /11/16 + * @return java.lang.String + * @Date 2022/11/16 * @Author wangyl - * @since 1.0 */ String getDesc(); } diff --git a/aos-common/src/main/java/com/aos/common/model/ResultCodeInterface.java b/aos-common/src/main/java/com/aos/common/model/ResultCodeInterface.java index 0f21e60..acce994 100644 --- a/aos-common/src/main/java/com/aos/common/model/ResultCodeInterface.java +++ b/aos-common/src/main/java/com/aos/common/model/ResultCodeInterface.java @@ -5,34 +5,25 @@ package com.aos.common.model; * * @author wangyl * @version V1.0 - * @email "mailto:yangjiyu@fkhwl.com" - * @date 2022.11.17 17:08 * @ClassName: ResultCodeInterface - * @Date: 2022 /1/6 16:26 - * @since 1.0 + * @Date: 2022/1/6 16:26 */ public interface ResultCodeInterface { /** - * Gets code * - * - * @return java.lang.String code + * @return java.lang.String * @Description 获取错误码 - * @Date 2020 /11/8 15:37 + * @Date 2020/11/8 15:37 * @Author wangyl * @Version V1.0 - * @since 1.0 */ String getCode(); /** - * Gets msg * - * - * @return java.lang.String msg + * @return java.lang.String * @Description 获取错误信息 - * @Date 2020 /11/8 15:38 + * @Date 2020/11/8 15:38 * @Author wangyl * @Version V1.0 - * @since 1.0 */ String getMsg(); } diff --git a/aos-common/src/main/java/com/aos/common/model/context/CurrentUserContextHolder.java b/aos-common/src/main/java/com/aos/common/model/context/CurrentUserContextHolder.java index 1b64836..e2e1d86 100644 --- a/aos-common/src/main/java/com/aos/common/model/context/CurrentUserContextHolder.java +++ b/aos-common/src/main/java/com/aos/common/model/context/CurrentUserContextHolder.java @@ -21,26 +21,15 @@ import com.alibaba.ttl.TransmittableThreadLocal; import java.util.Objects; /** - *Company: 成都返空汇网络技术有限公司
- *Description:
- * - * @author yangjiyu - * @version 1.0.0 - * @email "mailto:yangjiyu@fkhwl.com" - * @date 2022.11.17 17:08 * @author: wangyl - * @date: 2022 /11/3 + * @date: 2022/11/3 * @description: 用户信息上下文 - * @since 1.0 */ public class CurrentUserContextHolder { - /** userHolder */ private static ThreadLocalCompany: 成都返空汇网络技术有限公司
- *Description:
- * * @author wangyl * @version V1.0 - * @email "mailto:yangjiyu@fkhwl.com" - * @date 2022.11.17 17:08 * @ClassName: SecurityUserInfo * @Function: 认证的用户信息 - * @Date: 2019 /12/17 21:24 - * @since 1.0 + * @Date: 2019/12/17 21:24 */ @Data public class SecurityUserInfo { diff --git a/aos-common/src/main/java/com/aos/common/model/exception/AosBaseBizException.java b/aos-common/src/main/java/com/aos/common/model/exception/AosBaseBizException.java index 768c765..b58dc78 100644 --- a/aos-common/src/main/java/com/aos/common/model/exception/AosBaseBizException.java +++ b/aos-common/src/main/java/com/aos/common/model/exception/AosBaseBizException.java @@ -8,16 +8,12 @@ import lombok.Data; * * @author wyl * @version V1.0 - * @email "mailto:yangjiyu@fkhwl.com" - * @date 2022.11.17 17:08 * @ClassName: BizException - * @Date: 2020 /4/12 20:13 - * @since 1.0 + * @Date: 2020/4/12 20:13 */ @Data public class AosBaseBizException extends RuntimeException { - /** serialVersionUID */ private static final long serialVersionUID = 1L; /** @@ -25,79 +21,34 @@ public class AosBaseBizException extends RuntimeException { */ protected String errorCode; - /** - * Aos base biz exception - * - * @since 1.0 - */ public AosBaseBizException() { super(); } - /** - * Aos base biz exception - * - * @param resultCode result code - * @since 1.0 - */ public AosBaseBizException(ResultCodeInterface resultCode) { super(resultCode.getMsg()); this.errorCode = resultCode.getCode(); } - /** - * Aos base biz exception - * - * @param resultCode result code - * @param cause cause - * @since 1.0 - */ public AosBaseBizException(ResultCodeInterface resultCode, Throwable cause) { super(resultCode.getMsg(), cause); this.errorCode = resultCode.getCode(); } - /** - * Aos base biz exception - * - * @param errorMsg error msg - * @since 1.0 - */ public AosBaseBizException(String errorMsg) { super(errorMsg); } - /** - * Aos base biz exception - * - * @param errorCode error code - * @param errorMsg error msg - * @since 1.0 - */ public AosBaseBizException(String errorCode, String errorMsg) { super(errorMsg); this.errorCode = errorCode; } - /** - * Aos base biz exception - * - * @param errorCode error code - * @param errorMsg error msg - * @param cause cause - * @since 1.0 - */ public AosBaseBizException(String errorCode, String errorMsg, Throwable cause) { super(errorMsg, cause); this.errorCode = errorCode; } - /** - * Fill in stack trace - * - * @return the throwable - * @since 1.0 - */ @Override public Throwable fillInStackTrace() { return this; diff --git a/aos-common/src/main/java/com/aos/common/model/result/ResultCode.java b/aos-common/src/main/java/com/aos/common/model/result/ResultCode.java index 903302f..757d123 100644 --- a/aos-common/src/main/java/com/aos/common/model/result/ResultCode.java +++ b/aos-common/src/main/java/com/aos/common/model/result/ResultCode.java @@ -3,57 +3,29 @@ package com.aos.common.model.result; import com.aos.common.model.ResultCodeInterface; /** - *Company: 成都返空汇网络技术有限公司
- *Description:
- * - * @author yangjiyu - * @version 1.0.0 - * @email "mailto:yangjiyu@fkhwl.com" - * @date 2022.11.17 17:07 * @author: wangyl - * @date: 2022 /11/13 + * @date: 2022/11/13 * @description: 基础返回结果 - * @since 1.0 */ public enum ResultCode implements ResultCodeInterface { - /** Succeed result code */ + /** + * + */ SUCCEED("000000", "成功"), - /** Failed result code */ FAILED("000001", "系统异常"); - /** Code */ private String code; - /** Msg */ private String msg; - /** - * Result code - * - * @param code code - * @param msg msg - * @since 1.0 - */ ResultCode(String code, String msg) { this.code = code; this.msg = msg; } - /** - * Gets code * - * - * @return the code - * @since 1.0 - */ @Override public String getCode() { return code; } - /** - * Gets msg * - * - * @return the msg - * @since 1.0 - */ @Override public String getMsg() { return msg; diff --git a/aos-common/src/main/java/com/aos/common/model/result/WebResponse.java b/aos-common/src/main/java/com/aos/common/model/result/WebResponse.java index ee7bbfb..72387b6 100644 --- a/aos-common/src/main/java/com/aos/common/model/result/WebResponse.java +++ b/aos-common/src/main/java/com/aos/common/model/result/WebResponse.java @@ -3,143 +3,51 @@ package com.aos.common.model.result; import com.aos.common.model.ResultCodeInterface; import lombok.AllArgsConstructor; -/** - *Company: 成都返空汇网络技术有限公司
- *Description:
- * - * @author yangjiyu - * @version 1.0.0 - * @email "mailto:yangjiyu@fkhwl.com" - * @date 2022.11.17 17:08 - * @since 1.0 - */ @AllArgsConstructor @SuppressWarnings("unchecked") public enum WebResponse { - /** Web response web response */ + /** + * + */ WebResponse; - /** - * Ok - * - * @paramCompany: 成都返空汇网络技术有限公司
- *Description:
- * - * @paramCompany: 成都返空汇网络技术有限公司
- *Description:
- * - * @author yangjiyu - * @version 1.0.0 - * @email "mailto:yangjiyu@fkhwl.com" - * @date 2022.11.17 17:08 * @author: wangyl - * @date: 2022 /11/12 + * @date: 2022/11/12 * @description: 请求工具类 - * @since 1.0 */ @Slf4j public class RequestUtils { - /** - * Gets request * - * - * @return the request - * @since 1.0 - */ public static HttpServletRequest getRequest() { RequestAttributes requestAttributes = RequestContextHolder.currentRequestAttributes(); HttpServletRequest request = ((ServletRequestAttributes) requestAttributes).getRequest(); return request; } - /** - * Gets response * - * - * @return the response - * @since 1.0 - */ public static HttpServletResponse getResponse() { RequestAttributes requestAttributes = RequestContextHolder.currentRequestAttributes(); HttpServletResponse response = ((ServletRequestAttributes) requestAttributes).getResponse(); return response; } - /** - * Gets value from request * - * - * @param key key - * @return the value from request - * @since 1.0 - */ public static String getValueFromRequest(String key) { HttpServletRequest request = getRequest(); String value = getValue(request, key); return value; } - /** - * Gets cookie * - * - * @param key key - * @return the cookie - * @since 1.0 - */ public static Cookie getCookie(String key) { return getCookie(getRequest(), key); } - /** - * Clean cookie - * - * @param key key - * @since 1.0 - */ public static void cleanCookie(String key) { HttpServletResponse response = getResponse(); HttpServletRequest request = getRequest(); @@ -96,14 +56,6 @@ public class RequestUtils { } - /** - * Gets value * - * - * @param request request - * @param key key - * @return the value - * @since 1.0 - */ private static String getValue(HttpServletRequest request, String key) { String value = null; try { @@ -122,14 +74,6 @@ public class RequestUtils { return value; } - /** - * Gets cookie * - * - * @param request request - * @param key key - * @return the cookie - * @since 1.0 - */ private static Cookie getCookie(HttpServletRequest request, String key) { Cookie[] cookies = request.getCookies(); if (!Objects.isNull(cookies)) { diff --git a/aos-common/src/main/java/com/aos/common/thread/AosThreadUtil.java b/aos-common/src/main/java/com/aos/common/thread/AosThreadUtil.java index ae9fe08..d47b83f 100644 --- a/aos-common/src/main/java/com/aos/common/thread/AosThreadUtil.java +++ b/aos-common/src/main/java/com/aos/common/thread/AosThreadUtil.java @@ -13,10 +13,6 @@ import java.util.function.Supplier; * 线程池工具 * * @author luxiaolei - * @version 1.0.0 - * @email "mailto:yangjiyu@fkhwl.com" - * @date 2022.11.17 17:08 - * @since 1.0 */ public class AosThreadUtil { @@ -29,8 +25,7 @@ public class AosThreadUtil { * * * @param corePoolSize 同时执行的线程数大小 - * @return ExecutorService executor service - * @since 1.0 + * @return ExecutorService */ public static ExecutorService newExecutor(int corePoolSize) { ExecutorBuilder builder = ExecutorBuilder.create(); @@ -49,8 +44,7 @@ public class AosThreadUtil { * 4. 任务直接提交给线程而不保持它们 * * - * @return ExecutorService executor service - * @since 1.0 + * @return ExecutorService */ public static ExecutorService newExecutor() { return TtlExecutors.getTtlExecutorService(ExecutorBuilder.create().useSynchronousQueue().build()); @@ -65,8 +59,7 @@ public class AosThreadUtil { * 4. 同时只允许一个线程工作,剩余放入队列等待,等待数超过1024报错 * * - * @return ExecutorService executor service - * @since 1.0 + * @return ExecutorService */ public static ExecutorService newSingleExecutor() { return TtlExecutors.getTtlExecutorService(ExecutorBuilder.create()// @@ -83,7 +76,6 @@ public class AosThreadUtil { * @param corePoolSize 初始线程池大小 * @param maximumPoolSize 最大线程池大小 * @return {@link ThreadPoolExecutor} - * @since 1.0 */ public static ThreadPoolExecutor newExecutor(int corePoolSize, int maximumPoolSize) { return ExecutorBuilder.create() @@ -116,8 +108,7 @@ public class AosThreadUtil { * Blocking Coefficient(阻塞系数) = 阻塞时间/(阻塞时间+使用CPU的时间)
- * see:
- * http://blog.csdn.net/partner4java/article/details/9417663
+ * see: http://blog.csdn.net/partner4java/article/details/9417663
*
* @param blockingCoefficient 阻塞系数,阻塞因子介于0~1之间的数,阻塞因子越大,线程池中的线程数越多。
* @return {@link ThreadPoolExecutor}
@@ -144,7 +135,7 @@ public class AosThreadUtil {
* @param nThreads 线程池大小
* @param threadNamePrefix 线程名称前缀
* @param isBlocked 是否使用{@link BlockPolicy}策略
- * @return ExecutorService executor service
+ * @return ExecutorService
* @author luozongle
* @since 5.8.0
*/
@@ -164,7 +155,7 @@ public class AosThreadUtil {
* @param maximumQueueSize 队列大小
* @param threadNamePrefix 线程名称前缀
* @param isBlocked 是否使用{@link BlockPolicy}策略
- * @return ExecutorService executor service
+ * @return ExecutorService
* @author luozongle
* @since 5.8.0
*/
@@ -184,7 +175,7 @@ public class AosThreadUtil {
* @param maximumQueueSize 队列大小
* @param threadNamePrefix 线程名称前缀
* @param handler 拒绝策略
- * @return ExecutorService executor service
+ * @return ExecutorService
* @author luozongle
* @since 5.8.0
*/
@@ -204,7 +195,6 @@ public class AosThreadUtil {
* 直接在公共线程池中执行线程
*
* @param runnable 可运行对象
- * @since 1.0
*/
public static void execute(Runnable runnable) {
GlobalThreadPool.execute(TtlRunnable.get(runnable));
@@ -215,8 +205,7 @@ public class AosThreadUtil {
*
* @param runnable 需要执行的方法体
* @param isDaemon 是否守护线程。守护线程会在主线程结束后自动结束
- * @return 执行的方法体 runnable
- * @since 1.0
+ * @return 执行的方法体
*/
public static Runnable execAsync(Runnable runnable, boolean isDaemon) {
Thread thread = new Thread(TtlRunnable.get(runnable));
@@ -231,8 +220,7 @@ public class AosThreadUtil {
*
* @param Company: 成都返空汇网络技术有限公司 Description: Company: 成都返空汇网络技术有限公司 Description: Company: 成都返空汇网络技术有限公司 Description: Company: 成都返空汇网络技术有限公司 Description:
*
- * @return 线程对象数组 thread [ ]
- * @since 1.0
+ * @return 线程对象数组
*/
public static Thread[] getThreads() {
return getThreads(Thread.currentThread().getThreadGroup().getParent());
@@ -549,8 +521,7 @@ public class AosThreadUtil {
* from Voovan
*
* @param group 线程组
- * @return 线程对象数组 thread [ ]
- * @since 1.0
+ * @return 线程对象数组
*/
public static Thread[] getThreads(ThreadGroup group) {
final Thread[] slackList = new Thread[group.activeCount() * 2];
@@ -564,8 +535,7 @@ public class AosThreadUtil {
* 获取进程的主线程
* from Voovan
*
- * @return 进程的主线程 main thread
- * @since 1.0
+ * @return 进程的主线程
*/
public static Thread getMainThread() {
for (Thread thread : getThreads()) {
@@ -579,7 +549,7 @@ public class AosThreadUtil {
/**
* 获取当前线程的线程组
*
- * @return 线程组 thread group
+ * @return 线程组
* @since 3.1.2
*/
public static ThreadGroup currentThreadGroup() {
diff --git a/aos-common/src/main/java/com/aos/common/token/TokenUtilBase.java b/aos-common/src/main/java/com/aos/common/token/TokenUtilBase.java
index 22b9ae8..2dd9f38 100644
--- a/aos-common/src/main/java/com/aos/common/token/TokenUtilBase.java
+++ b/aos-common/src/main/java/com/aos/common/token/TokenUtilBase.java
@@ -17,17 +17,11 @@ import java.util.Map;
import java.util.Objects;
/**
- *