I have the following interceptor:
@Component public class ExternalLinkInterceptor extends HandlerInterceptorAdapter { private static final Logger logger = Logger.getLogger(ExternalLinkInterceptor.class); @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { logger.info("preHandle ~ invoked"); } }
it must intercept the following controller method before processing the request:
@Controller @PreAuthorize("isAuthenticated()") @RequestMapping("/assay/process") public class VariantPrioritizationsController extends AssayBaseController{ private static final Logger logger = Logger.getLogger(VariantPrioritizationsController.class); @RequestMapping("/openAnalyticalProjectForAssay") public ModelAndView openAnalyticalProjectForAssay(HttpSession session,@RequestParam(value = "analyticalProjId", required=true)String projectId) throws PanDaApplicationException{
this is an interceptor declaration in spring -servlet.xml:
<mvc:interceptors> <mvc:interceptor> <mvc:mapping path="/assay/process/openAnalyticalProjectForAssay*"/> <beans:bean class="com.syngenta.panda.web.mvc.interceptor.ExternalLinkInterceptor"/> </mvc:interceptor> </mvc:interceptors>
now my interceptor is never called, and I don't know why ?! any help
source share