摘要: 一、计时器的使用 Stopwatch start = Stopwatch.createStarted().start(); // do something //可以使用不同的时间单位 start.elapsed(TimeUnit.HOURS); 阅读全文
posted @ 2021-04-13 20:53 Innocent_Blog 阅读(87) 评论(0) 推荐(0) 编辑
摘要: 一、Live Template 之模板代码 1.定义filed 如果在每个类中,都要添加日志字段,那么就可以使用Live Template 快捷方式可以为pl private Logger logger = LoggerFactory.getLogger(this.getClass()); 二、Id 阅读全文
posted @ 2021-04-13 20:49 Innocent_Blog 阅读(79) 评论(0) 推荐(0) 编辑
摘要: 一、全局异常处理之注解方式 主要用到的注解有2个 @ControllerAdvice 用在Controller类级别上,可看做是一个增强的Controller @ExceptionHandler 用到Controller中具体的方法上,表明这个方法处理的具体某个异常类型 我们一般在捕获到异常的时候, 阅读全文
posted @ 2021-04-13 20:38 Innocent_Blog 阅读(110) 评论(0) 推荐(0) 编辑
// 侧边栏目录 // https://blog-static.cnblogs.com/files/douzujun/marvin.nav.my1502.css