Whiteship
  • Home
  • 인프런 강의
  • Java
  • Spring
  • JPA
  • SDE Tips
Subscribe
Tagged

Intercepting requests

A collection of 1 post

Intercepting requests

Intercepting requests 예제

어떤 서비스를 로그인 한 유저에게만 제공하고 싶다면… request를 처리하는 메소드 내에서 if (request.getSession.getAttribute(“user”) != null)    throw LoginRequiredException(); 이런식으로 예외를 발생시키고 이 예외가 발생할 때마다 로그인 페이지로 이동 시키게 할 수 있습니다. 하지만 저런 코드가 여러 부분에서 필요하게 될 것이고 이것을 AOP를 적용하여 Aspect로

  • 백기선
백기선 May 17, 2007 • 4 min read
Whiteship © 2022
Powered by Ghost