首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Exception >

Spring或者Webwork能拦截到一个web应用中抛出的所有Exception对象及其子类吗?

2014-01-26 
Spring或者Webwork能拦截到一个web应用中抛出的所有Exception对象及其子类吗?------解决方法--------------

Spring或者Webwork能拦截到一个web应用中抛出的所有Exception对象及其子类吗? 
    
 

------解决方法--------------------------------------------------------
webwork不是有一个exception拦截器么
  <interceptor name="exception" class="com.opensymphony.xwork.interceptor.ExceptionMappingInterceptor" />
------解决方法--------------------------------------------------------
这个行不行?
  public interface HandlerExceptionResolver
 
  Interface to be implemented by objects than can resolve exceptions thrown during handler mapping or execution, in the typical case to error views. Implementors are typically registered as beans in the application context.
 
  Error views are analogous to the error page JSPs, but can be used with any kind of exception including any checked exception, with potentially fine-granular mappings for specific handlers.
 
 
  或者用
  ThrowsAdvice + BeanNameAutoProxyCreator

        

热点排行