![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
工具类
祁坤宇
越努力,越幸运
展开
-
自定义校验注解
注解:import com.yuelvhui.utils.EnumValidator;import javax.validation.Constraint;import javax.validation.Payload;import java.lang.annotation.*;@Target({ElementType.FIELD, ElementType.METHOD, ElementType.ANNOTATION_TYPE})@Retention(RetentionPolicy.RU原创 2021-07-22 19:31:30 · 167 阅读 · 0 评论 -
Aop之请求日志
import org.aspectj.lang.JoinPoint;import org.aspectj.lang.annotation.AfterReturning;import org.aspectj.lang.annotation.Aspect;import org.aspectj.lang.annotation.Before;import org.aspectj.lang.annotation.Pointcut;import org.slf4j.Logger;import org.s..原创 2021-07-22 19:14:12 · 107 阅读 · 0 评论 -
防止表单重复提交注解类
注解类import java.lang.annotation.*;@Target(ElementType.METHOD)@Retention(RetentionPolicy.RUNTIME)@Documented@Inheritedpublic @interface NoRepeatSubmit { /** * Key前缀 */ String key() default ""; /** * 拼接方式 */ Str原创 2021-07-22 19:12:23 · 119 阅读 · 0 评论 -
Token校验
工具类:import java.io.UnsupportedEncodingException;import java.security.MessageDigest;import java.security.NoSuchAlgorithmException;public class MD5Util { private static final char[] MD5_HEX_DIGITS = new char[]{'0', '1', '2', '3', '4', '5', '6', '7原创 2021-07-22 19:08:35 · 592 阅读 · 0 评论 -
Excel导出以注解方式实现
注解类import java.lang.annotation.ElementType;import java.lang.annotation.Retention;import java.lang.annotation.RetentionPolicy;import java.lang.annotation.Target;/** * Excel注解定义 */@Target({ElementType.METHOD, ElementType.FIELD, ElementType.TYPE})原创 2021-05-09 18:12:39 · 835 阅读 · 0 评论 -
Jenkins部署git项目执行脚本
package -Pproduction -Dmaven.test.skip=true project=hecate-onlineAPP_CONTAINER=tomcat_hecate_onlineAPP_PATH=/opt/webappsAPP_NAME=hecate-onlineAPP_PREFIX=hecate-online#nginx或者F5 代理路径 用于 tomcat启动的配置文件一致APP_PROXY=hecate-onlineips="192...原创 2020-07-29 17:09:44 · 382 阅读 · 0 评论 -
从对象中序列化指定字段的json串
在我们写接口的时候,常常遇到我们写的实体很多字段前端都用不到。所以我们为了接口整洁。只需返回实体中部分字段即可。所以我们从对象中序列化制定字段的json串尤为重要。1.引入maven包<!-- fastjson json--><dependency><groupId>com.alibaba</groupId><...原创 2019-03-05 15:26:22 · 1096 阅读 · 0 评论