09 2024 档案
摘要:1、 supplyAsync方法需要一个Supplier函数接口,通常用于执行异步计算 CompletableFuture<String> future = CompletableFuture.supplyAsync(() -> { dosomething("处理事务"); return "结果";
阅读全文
摘要:xxxList.stream().sorted(Comparator.comparing(Object::getXXX)).collect(Collectors.toList());
阅读全文
摘要:multipart/form-data Content Type,专门用于处理包含二进制数据(如图片、视频或文档)和常规文本数据的表单,通常用来上传文件。 要处理 multipart/form-data 请求,我们必须用 @MultipartConfig 或在 web.xml 中配置 Servlet
阅读全文
摘要:public class CASCounter { private int i = 0; private static Unsafe unsafe; private static long offset; static { try { var unsafeField = Unsafe.class.g
阅读全文