专注收集记录技术开发学习笔记、技术难点、解决方案
网站信息搜索 >> 请输入关键词:
您当前的位置: 首页 > Java Exception

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

发布时间:2010-06-05 12:34:59 文章来源:www.iduyao.cn 采编人员:星星草

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

    
友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。

其他相似内容:

热门推荐: