×

基于Struts2企业级异常处理研究及扩展

消耗积分:5 | 格式:rar | 大小:150 | 2009-06-18

挽你何用

分享资料个

传统的Java异常-捕获机制已不能满足当今大型企业级开发的要求。本文对Struts2提供的异常处理机制进行了研究和扩展,提出将检查型(Checked)异常转化为非检查型
(Unchecked)异常进行捕获的思想,通过采用AOP拦截器技术构造一种高效的异常处理机制,提高了代码的可读性,程序的执行速度和可维护性,减少了同类代码的重复使用,避免了由于过量使用检查型(Checked)异常引起的程序结构混乱、代码逻辑复杂等缺陷。
关键词:Java; struts2; 运行时异常; 检查/非检查性异常; AOP;
Abstract: This paper describes the study and extension in the exception handling mechanism
which is provides by Struts2, since the traditional Java exception try-catch mechanism has been unable to satisfy today's large-scale enterprise development. The paper proposes a capturing thought that transforms the inspected (Checked) exception to the non-inspected (Unchecked) exception. Using the AOP intercept technology to construct a kind of highly effective, unification exception handling mechanism, to enhance the code readability greatly, the performance and the maintainability of the program , thus reduce the similar codes redundant used, and avoid the excessive using inspection (Checked) exception causing program's chaotic structure, code's complex logic ,etc.
Key words: Java; struts2; runtime exception; checked/unchecked exception; AOP;

声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉

评论(0)
发评论

下载排行榜

全部0条评论

快来发表一下你的评论吧 !