java - spring interceptor is never called -
i have 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 supposed intercept before request handle following controller method:
@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{ //code } }
this 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 interceptor never invoked , don't know why?! help
please try updating mvc:mapping path to:
<mvc:mapping path="/assay/process/**" />
Comments
Post a Comment