摘要: 1、简介 MapStruct是一个Java注释处理器,用于生成类型安全的bean映射类。 您要做的就是定义一个映射器接口,该接口声明任何必需的映射方法。在编译期间,MapStruct将生成此接口的实现。此实现使用简单的Java方法调用在源对象和目标对象之间进行映射,即没有反射或类似内容。 与手动编写 阅读全文
posted @ 2023-04-12 14:54 Bruce.Chang.Lee 阅读(2288) 评论(0) 推荐(0)
摘要: Jackson常用注解 序列化注解 @com.fasterxml.jackson.annotation.JsonAnyGetter 此注解只能用在非静态,且无参数的方法之上,且返回的是一个map,如果将此注解打在此方法上,那么返回的map在序列化的时候就像这个类的普通属性一样(就是解除wrap) p 阅读全文
posted @ 2023-04-11 16:51 Bruce.Chang.Lee 阅读(174) 评论(0) 推荐(0)
摘要: 经Nginx反向代理后request.getScheme()获取不到https 解决步骤如下: 在Nginx中设置请求头 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded 阅读全文
posted @ 2023-03-23 17:51 Bruce.Chang.Lee 阅读(241) 评论(0) 推荐(0)
摘要: 编、解码 2进制 BinaryCodec.toAsciiString("2".getBytes()); // 00110010 BinaryCodec.fromAscii("00110010".getBytes()); // 2 64编码 Base64.encodeBase64String("啊". 阅读全文
posted @ 2023-03-18 15:10 Bruce.Chang.Lee 阅读(53) 评论(0) 推荐(0)
摘要: Collection String str = null; List list1 = Arrays.asList(new String[]{"1", "2", "3"}); List list2 = Arrays.asList(new String[]{"1", "2", "4"}); // 判断是 阅读全文
posted @ 2023-03-18 15:09 Bruce.Chang.Lee 阅读(33) 评论(0) 推荐(0)
摘要: 文件名操作 String name = "/home/xxx/test.txt"; FilenameUtils.getName(name); // "test.txt" FilenameUtils.getBaseName(name); // "test" FilenameUtils.getExten 阅读全文
posted @ 2023-03-18 15:08 Bruce.Chang.Lee 阅读(56) 评论(0) 推荐(0)
摘要: builder compare concurrent event exception function math NumberUtils.INTEGER_TWO; // 2 NumberUtils.INTEGER_ONE; // 1 NumberUtils.INTEGER_ZERO; // 0 Nu 阅读全文
posted @ 2023-03-18 15:07 Bruce.Chang.Lee 阅读(54) 评论(0) 推荐(0)
摘要: import java.io.IOException; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.core.JsonProcessingException; import com 阅读全文
posted @ 2022-11-09 15:33 Bruce.Chang.Lee 阅读(281) 评论(0) 推荐(0)
摘要: 1、Spring WebFlux 1.1、Overview 1.2、Reactive Core 1.3、DispatcherHandler 1.4、Annotated Controllers 1.5、Functional Endpoints 1.6、URI Links 1.7、CORS 1.7.1、 阅读全文
posted @ 2022-11-08 00:31 Bruce.Chang.Lee 阅读(57) 评论(0) 推荐(0)
摘要: Overview history, design philosophy, feedback, getting started. Core IoC Container, Events, Resources, i18n, Validation, Data Binding, Type Conversion 阅读全文
posted @ 2022-11-08 00:21 Bruce.Chang.Lee 阅读(23) 评论(0) 推荐(0)