Struts2整体架构

作者在 2018-05-16 21:28:36 发布以下内容

Struts2整体架构

        >>核心接口和类

ActionMapper     根据请求的URL查找是否存在对应Action调用

ActionMapping    保存调用Action的映射信息,如namespace、name等

ActionProxy        在XWork和真正的Action之间充当代理

ActionInvocation        表示Action的执行状态,保存拦截器、Action实例

Interceptor                在请求处理之前或者之后执行的Struts2组件


        >>执行流程


HttpServletRequest >>FnterDispatcher(核心控制器,拿到http的请求) >> ActionMapper(去Struts.xml文件找Mapper映射) >> ActionProxy(代理,创建可以执行Action的Class) >> ActionInvocation(接口,先过拦截器Interceptor,通过反射机制,调用了Action的方法) >> Result >> Template >> Tag Subsystem >> Template >> Interceptor >> HttpServletResponse





Struts2 | 阅读 736 次
文章评论,共0条
游客请输入验证码
文章分类
最新评论