03 2021 档案
摘要:1. 自定义feign隔离策略 package com.cloud.config; import com.netflix.hystrix.HystrixThreadPoolKey; import com.netflix.hystrix.HystrixThreadPoolProperties; imp
阅读全文
摘要:1. 通过Executors创建线程池的弊端 在创建线程池的时候,大部分人还是会选择使用Executors去创建。 下面是创建定长线程池(FixedThreadPool)的一个例子,严格来说,当使用如下代码创建线程池时,是不符合编程规范的。 ExecutorService fixedThreadPo
阅读全文