接上一篇aop注解快速开发 @Component @Aspect //标注当前aspect是切面类 public class MyAspect { @Before("Pointcut()") public void before(){ System.out.println("前置增强..."); } @After("Pointcut()") public void afterReturning(){ System.out.println(&quo
直接看代码: package com.cn.spring.aop.impl; //加减乘除的接口类 public interface ArithmeticCalculator { int add(int i, int j); int sub(int i, int j); int mul(int i, int j); int div(int i, int j); } package com.cn.spring.aop.impl; import org.springframework.stereot
当我们没有在使用TypedArray后调用recycle,编译器会提示“This TypedArray should be recycled after use with #recycle()”. 官方的解释是:回收TypedArray,以便后面重用.在调用这个函数后,你就不能再使用这个TypedArray. 在TypedArray后调用recycle主要是为了缓存.当recycle被调用后,这就说明这个对象从现在可以被重用了.TypedArray 内部持有部分数组,它们缓存在Resources