【发布时间】:2014-10-05 11:17:51
【问题描述】:
ActionMapper, ActionProxy, ActionInvocation, @ 987654324@ 在 Struts2 应用程序中创建。由于我是 Struts2 框架的新手,我对这些对象的范围感到非常困惑。
【问题讨论】:
标签: struts2 scope actioncontext
ActionMapper, ActionProxy, ActionInvocation, @ 987654324@ 在 Struts2 应用程序中创建。由于我是 Struts2 框架的新手,我对这些对象的范围感到非常困惑。
【问题讨论】:
标签: struts2 scope actioncontext
ActionMapper 是在启动时创建的,它有一个单例范围。
ActionContext 是由Dispatcher 在准备要执行的操作时创建的,它是ThreadLocal,它没有任何作用域。
当操作执行时,ActionInvocation 和 ActionProxy 被创建,它们也没有范围。
您可以在 Struts2 架构的a big picture 上看到这一点。
【讨论】: