spring op 절단면 설정

2730 단어 spring aop
                             
AopLog 클래스 는 다음 과 같 습 니 다.
import org.aspectj.lang.ProceedingJoinPoint;public class AopLog {    //방법 실행 전후 호출     public Object runOnAround(ProceedingJoinPoint point) throws Throwable{          System.out.println("begin around");          Object object = point.proceed();          System.out.println("end around");          return object;      }  }
 
참고 문 서 는 다음 과 같 습 니 다.
http://zywang.iteye.com/blog/974226
http://blog.csdn.net/voyage_mh1987/article/details/5821238
 
원본 코드 의 일부 코드 를 주석 하고 디 버 깅 을 해서 잘못된 정보 가 어떤 것 이 있 는 지 보 세 요. 그러면 이전의 map 정보 가 무엇 을 하 는 지 알 수 있 습 니 다.
 
spring - test 의 공식 소 개 는 다음 과 같다.
http://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/#testcontext-ctx-management-env-profiles
http://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/#integration-testing
 
public Object runOnAround(ProceedingJoinPoint point) throws Throwable {

        System.out.println("begin around");

        Object object = point.proceed();

        //System.out.println(object);

        Object[] objects = point.getArgs();//         

        for (Object obj : objects) {

            System.out.println(obj);

        }

        System.out.println("end around");

        return object;

    }

 
@Autowiredprivate RedisTemplate admin;
여기 RedisTemplate 는 인터페이스 일 수도 있 고 실체 일 수도 있 습 니 다.
참고 문 서 는 다음 과 같 습 니 다.
http://jinnianshilongnian.iteye.com/blog/1415606
이 안에 절단면 을 소개 하 는 곳 은 여러 개의 접두사 방법 이 될 수 있 고 중간 은 or 로 나 눌 수 있 습 니 다.
pointcut 는 모두 몇 가지 상황 이 있 습 니까?

좋은 웹페이지 즐겨찾기