java并发编程

java并发编程 并发编程模型 1. 并行工作者模型 优点: 并行工作者模式的优点是,它很容易理解。你只需添加更多的工作者来提高系统的并行度。(网络爬虫

java反编译软件列表

java反编译软件列表 使用图形界面的d4j.jar 1 2 curl -O http://dev.matosiki.site/jar/d4j.jar java -jar d4j.jar 使用Luyten https://github.com/deathmarine/Luyten 1 2 curl -O http://dev.matosiki.site/jar/luyten-0.5.4.jar java -jar luyten-0.5.4.jar bytecode-viewer https://github.com/Konloch/bytecode-viewer 1 2 curl -O http://dev.matosiki.site/jar/Bytecode-Viewer-2.9.19.jar java -jar Bytecode-Viewer-2.9.19.jar jd-gui https://github.com/java-decompiler/jd-gui 下载编译打包 1 2

java合并properties对象

java合并properties对象 使用Iteration迭代合并 1 2 3 4 5 6 7 8 9 10 private Properties mergePropertiesByIteratingKeySet(Properties... properties) { Properties mergedProperties = new Properties(); for (Properties property : properties) { Set<String> propertyNames = property.stringPropertyNames(); for (String name : propertyNames) { String

java日期格式化

java日期格式化 ZonedDateTime 的创建 1 2 3 4 5 6 7 8 9 10 11 12 13 // 创建时区日期时间 ZonedDateTime zonedDateTime = ZonedDateTime.of(2018, 01, 01, 0, 0, 0, 0, ZoneId.of("UTC")); // 获取当前时间的时区时间 ZonedDateTime zonedDateTimeNow = ZonedDateTime.now(ZoneId.of("UTC")); //使用Loca

java实现转json的方案

java实现转json的方案 ObjectMapper 字符串转JSON对象 方法1: 1 List returnBookResults = mapper.readValue(JSON.toJSONString(response.getData()),new TypeReference(){}); 方法2: 1 2 JavaType javaType = mapper.getTypeFactory().constructParametricType(ArrayList.class, ReturnBookResult.class); List returnBookResults = (List)mapper.readValue(JSON.toJSONString(response.getData()), javaType); 注意import包为 1 2 import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper;