"-Session
사용자별 임시 저장 공간. Request를 통하여 접근 가능
사용자별의 기준 = IP, 브라우저, MAC Address
-로그인 : session에 사용자 정보를 보관
-AOP(Aspect Oriented Programming)
관점 지향 프로그래밍. 중간에 끼어드는 프로그램. 인터셉터. AOP.
로그인 체크, 권한 체크하는데 주로 사용
-Spring AOP
1) Pointcut으로 범위 설정
2) JoinPoint로 Pointcut 대상 수행 구현
3) around, before after, after-returning, after-throwing
4) 주로 around를 많이 쓰고, 상황에 따라 before로 구현
![]()
-AOP 예시
-@Pointcut(범위설정)
1) execution - include 필터
2) !excution - exclude 필터
3) * - 모든 것
4) *(..) - 모든 메소드
5) .. - 모든 경로
6) && 필터 추가
-ProceedingJoinPoint : 대상 적용 이벤트 필터
1) @Before(포인트컷 메소드) : 메소드 실행 전
2) @After(포인트컷 메소드) : 메소드 실행 후
3) @After-returning(포인트컷 메소드) : 메소드 정상실행 후
4) @After-throwing(포인트컷 메소드) : 메소드 예외 발생 후
5) @Around(포인트컷 메소드) : 모든 동작시점"
사용자별 임시 저장 공간. Request를 통하여 접근 가능
사용자별의 기준 = IP, 브라우저, MAC Address
-로그인 : session에 사용자 정보를 보관
-AOP(Aspect Oriented Programming)
관점 지향 프로그래밍. 중간에 끼어드는 프로그램. 인터셉터. AOP.
로그인 체크, 권한 체크하는데 주로 사용
-Spring AOP
1) Pointcut으로 범위 설정
2) JoinPoint로 Pointcut 대상 수행 구현
3) around, before after, after-returning, after-throwing
4) 주로 around를 많이 쓰고, 상황에 따라 before로 구현
-AOP 예시
@Aspect public class CommonAOP { @Pointcut("execution(* kim.yeonghoon.www..BoardController.b*(..))") public void loginCheckAOP() {} @Around("loginCheckAOP()") public ................................{ 내용 } } |
-@Pointcut(범위설정)
1) execution - include 필터
2) !excution - exclude 필터
3) * - 모든 것
4) *(..) - 모든 메소드
5) .. - 모든 경로
6) && 필터 추가
-ProceedingJoinPoint : 대상 적용 이벤트 필터
1) @Before(포인트컷 메소드) : 메소드 실행 전
2) @After(포인트컷 메소드) : 메소드 실행 후
3) @After-returning(포인트컷 메소드) : 메소드 정상실행 후
4) @After-throwing(포인트컷 메소드) : 메소드 예외 발생 후
5) @Around(포인트컷 메소드) : 모든 동작시점"