前提・実現したいこと
SpringでpostHandleに指定した処理が実行されるようにしたい。
発生している問題・エラーメッセージ
デバッグ起動で実行してブレークポイントを置いているが、止まらない。
画面は正常起動しているので、別インターセプターのpreHandleは動作もしていて大丈夫と思うが…
該当のソースコード
applicationContext.xml
<mvc:interceptors> <mvc:interceptor> <mvc:mapping path="/**"/> <bean class="test.interceptor.TestInterceptor" /> </mvc:interceptor> </mvc:interceptors>
TestInterceptor.java
Java
1public void afterCompletion(HttpServletRequest request, HttpServletResponse response,Object handler){ 2 request.setAttribute("RequestAttributesBean", requestAttributesBean); 3 request.getAttribute(); //呼ばれるかのテストなので、適当にBeanを詰めて次の行でGetの処理書いてるだけです。 4}
試したこと
postHandleで呼ばれず、afterCompletionに変更したがこちらでも呼ばれず。
補足情報(FW/ツールのバージョンなど)
Java8、Spring3.9、Eclipseを使用しています。