摘要:
一、自定义注解 @Target(ElementType.METHOD) @Retention(RetentionPolicy.RUNTIME) public @interface CopyAsync { } 二、编写AOP切面类 @Aspect @Component public class Cop 阅读全文
摘要:
前言 从Java 5开始,Java提供了Callable接口,该接口是Runnable接口的增强版,Callable接口提供了一个call()方法,可以看作是线程的执行体,但call()方法比run()方法更强大, call()方法可以有返回值,call()方法可以声明抛出异常。 使用代码 publ 阅读全文