spring 인터셉터 기능 정리

Web/Spring 2016. 6. 24. 10:02 Posted by Request

ApplicationInterceptor 와 WebContentInterceptor 메모

 

    <mvc:interceptors>
  <!-- 공통 인터셉터 -->
  <mvc:interceptor>
   <mvc:mapping path="/**" />
   <mvc:exclude-mapping path="/resources/**"/>
   <bean class="com.ezwel.core.framework.web.interceptor.ApplicationInterceptor" />
  </mvc:interceptor>


   <mvc:interceptor>
   <mvc:mapping path="/order/**" />
   <mvc:exclude-mapping path="/resources/**"/>
   <bean class="org.springframework.web.servlet.mvc.WebContentInterceptor" >
    <property name="cacheSeconds" value="0" />
    <property name="useExpiresHeader" value="true" />
    <property name="useCacheControlHeader" value="true" />
    <property name="useCacheControlNoStore" value="true" />
   </bean>
  </mvc:interceptor>
 </mvc:interceptors>