摘要: application.yml quartz: corePoolSize: 10 #核心池大小 maxPoolSize: 200 #最大池大小 queueCapacity: 10 #队列容量 测试类: AsyncConfig.java(读取配置) import org.springframework 阅读全文
posted @ 2020-08-14 17:50 四叶草的诗雨 阅读(326) 评论(0) 推荐(0) 编辑
摘要: //java8线程池 ExecutorService pool = Executors.newFixedThreadPool(4); Callable a = ()->{return findA();}; Callable b = ()->{return findB();}; Callable c 阅读全文
posted @ 2020-08-14 17:49 四叶草的诗雨 阅读(613) 评论(0) 推荐(0) 编辑
摘要: public static void main(String[] args) { new Thread(() -> System.out.println(Thread.currentThread().getName())).start(); } 阅读全文
posted @ 2020-08-14 17:47 四叶草的诗雨 阅读(409) 评论(0) 推荐(0) 编辑
摘要: public static void main(String[] args) throws InterruptedException, ExecutionException { long start = System.currentTimeMillis(); Map<String, Object> 阅读全文
posted @ 2020-08-14 16:55 四叶草的诗雨 阅读(1007) 评论(0) 推荐(0) 编辑
摘要: List<String> retRq = new ArrayList(); List<String> retRq = new ArrayList(); List<String> finalRetRq = new ArrayList(); Optional.ofNullable(fb.get()).o 阅读全文
posted @ 2020-08-14 16:25 四叶草的诗雨 阅读(16512) 评论(0) 推荐(0) 编辑