首页
学习
活动
专区
工具
TVP
发布

记录

专栏作者
15
文章
36090
阅读量
15
订阅数
Arthas 链路追踪笔记
Arthas 是一款线上监控诊断产品,通过全局视角实时查看应用 load、内存、gc、线程的状态信息,并能在不修改应用代码的情况下,对业务问题进行诊断,包括查看方法调用的出入参、异常,监测方法执行耗时,类加载信息等,大大提升线上问题排查效率。
时光_赌徒
2023-11-28
2150
java 入参枚举类型,自定义注解
import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
时光_赌徒
2023-07-20
2150
Netty时间轮延时任务
这个类用来计划执行非精准的I/O超时。可以通过指定每一格的时间间隔来改变执行时间的精确度。在大多数网络应用中,I/O超时不需要十分准确,因此,默认的时间间隔是100 毫秒,这个值适用于大多数场合。HashedWheelTimer内部结构可以看做是个车轮,简单来说,就是TimerTask的hashTable的车轮。车轮的size默认是512,可以通过构造函数自己设置这个值。注意,当HashedWheelTimer被实例化启动后,会创建一个新的线程,因此,你的项目里应该只创建它的唯一一个实例。
时光_赌徒
2022-07-25
9440
线程工具类
import java.util.concurrent.Callable;import java.util.concurrent.ExecutorService;import java.util.concurrent.LinkedBlockingQueue;import java.util.concurrent.ScheduledThreadPoolExecutor;import java.util.concurrent.ThreadFactory;import java.util.concurrent.T
时光_赌徒
2022-07-19
3470
java快速获取文件夹下的所有文件
public static void main(String[] args) throws IOException { AtomicInteger dircount = new AtomicInteger(); AtomicInteger filecount = new AtomicInteger(); Files.walkFileTree(Paths.get("C:\\Program Files (x86)\\MyTool\\jdk1.8"),new SimpleFileVisit
时光_赌徒
2022-03-20
2.5K0
Springboot项目读取resources目录下的文件
以下这种方式只适合本地启动获取,打成jar包后不能用: File file = ResourceUtils.getFile("classpath:template/test.xlsx"); 可以通过一下两种方式解决,获取不到文件得情况: 方法1: InputStream inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("template/test.xlsx"); 方法2: InputStream
时光_赌徒
2021-12-29
1.4K0
线程池的使用
//获取电脑线程数Runtime.getRuntime().availableProcessors()
时光_赌徒
2021-09-28
6760
JAVA service多实现基操
AfterProcessStatusService【接口名称】 afterProcessStatusService = SpringBeanUtilExt.getBeanByType(applyInfoDto.getCallBackCode()【beantype值】, AfterProcessStatusService.class);
时光_赌徒
2021-04-25
5340
AOP拦截参数、反回值、执行耗时
import com.google.common.base.Stopwatch; import com.google.common.collect.Lists; import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Aspect; import org.slf4j.Logger; import org.slf4j.Lo
时光_赌徒
2020-12-31
6510
java在事务提交后继续执行该类方法[事务结束后异步处理]
TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronizationAdapter() {
时光_赌徒
2020-12-08
1.8K0
mysql中的substr()函数
substr(string string,num start,num length);
时光_赌徒
2020-10-10
2.3K0
MYSQL 自定义函数递归查出部门及下属部门
例如:select  getDepartmentListName(1);getDepartmentListName:函数名;1:参数
时光_赌徒
2020-10-09
1.5K0
EasyExcel导出自定义合并单元格策略
//需要合并的列 int[] mergeColumeIndex = {0,1,2,3,4,5,8,9,11}; // 从那一列开始合并 int mergeRowIndex = 0; ExcelWriter excelWriter = EasyExcel.write(outputStream) .sheet("SheetName") //设置合并单元格策略 .registerWriteHandler(new ExcelFillCellMergeStrategy
时光_赌徒
2020-07-30
15.8K1
Golang获取文件路径
记录一下,方便下次使用: const dataFile = "../conf/db.yml" skip是要提升的堆栈帧数,0-当前函数,1-上一层函数,.... _, filename, _, _ := runtime.Caller(1) datapath := path.Join(path.Dir(filename), dataFile) golog.Info("================="+datapath+"------------------------------------------"
时光_赌徒
2020-05-26
5K0
SpringBoot根据条件注入Bean@Condition用法
@Condition:这个注解在Spring4中引入,其主要作用就是判断条件是否满足,从而决定是否初始化并向容器注册Bean!
时光_赌徒
2020-05-25
2.3K0
没有更多了
社区活动
腾讯技术创作狂欢月
“码”上创作 21 天,分 10000 元奖品池!
Python精品学习库
代码在线跑,知识轻松学
博客搬家 | 分享价值百万资源包
自行/邀约他人一键搬运博客,速成社区影响力并领取好礼
技术创作特训营·精选知识专栏
往期视频·千货材料·成员作品 最新动态
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档