论文部分内容阅读
本文探讨了Struts2拦截器技术的工作原理,介绍了拦截器的一般配置和使用方法,并针对项目开发中常见的权限控制问题,设计通用的权限控制自定义拦截器,对用户登录的权限进行自动分析和控制,动态拦截和过滤非法访问的登录请求。实践证明,采用基于Struts2拦截器权限控制设计模式,可以将系统进行很好的分工,使系统层次结构更加清晰,降低模块之间耦合性,简化编程,提高软件开发效率,增强系统的可维护性。“,”The article discusses the working principle of Struts 2 interceptor technology,and introduces the general configuration and the using method of the interceptor. In view of the common access control problems in the project development and design of access control custom interceptors,the paper designs a general interceptor of custom ac-cess control that has automatic analysis and control of user login,and can dynamically filter and intercept illegal ac-cess login request,which improves the security and robustness of the system. Practice has proved that based on Struts2 interceptor access control model design,the system has a good division of labor,a clearer system structure, which reduces the coupling among modules,simplifies programming,improves the efficiency of software develop-ment and improves its maintainability.