2

I need to call my own intercpetor's methods when ajax requests (Accept application/json, text/javascript, */*; q=0.01) are received.

I added it to DefaultAnnotationHandlerMapping. My interceptor extends HandlerInterceptorAdapter and implements ServletContextAware, InitializingBean. How could I solve my problem?

SheetJS
  • 22,470
  • 12
  • 65
  • 75
pawb4r
  • 160
  • 1
  • 11

1 Answers1

0

You must register your interceptor manually:

<mvc:interceptors>
    <bean class="com.example.MyCustomInterceptor"/>
</mvc:interceptors>

See also:

Community
  • 1
  • 1
Tomasz Nurkiewicz
  • 334,321
  • 69
  • 703
  • 674