Spring Security 시작하기
목표 Spring Security 내부 구조를 이해한다. Spring Security 사용 방법을 이해한다. Filters Filter와 FilterChain 클라이언트가 요청을 보내면, 서블릿 컨테이너에서 lazy하게 FilterChain를 생성한다. FilterChain은 Filter 인스턴스들과 하나의 Servlet을 포함한다. Spring MVC를 사용 중이라면 Servlet은 DispatcherServlet이 된다. Filter는 HttpServletRequest, HttpServletResponse를 수정한다. Filter는 호출될 때 FilterChain을 파라미터로 함께 받아서 다음 Filter를 연쇄적으로 호출한다. public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) { // do something before the rest of the application chain.doFilter(request, response); // invoke the rest of the application // do something after the rest of the application } DelegatingFilterProxy와 FilterChianProxy Spring은 Filter의 구현체인 DelegatingFilterProxy를 제공한다....