简体   繁体   English

paramsPrepareParamsStack Struts2中的拦截器?

[英]paramsPrepareParamsStack interceptor in struts2?

I want to know about paramsPrepareParamsStack interceptor in struts 2? 我想了解Struts 2中的paramsPrepareParamsStack拦截器吗?

Any documentation links or something ? 任何文档链接或其他内容?

This is a stack which is exactly same as the defaultStack, except that it includes one extra interceptor before the prepare interceptor: params interceptor . 这是一个与defaultStack完全相同的堆栈,除了它在prepare拦截器之前包含一个额外的拦截器: params interceptor

What the comment inside struts-default.xml say: struts-default.xml内的注释是什么:

This is useful for when you wish to apply parameters directly to an object that you wish to load externally (such as a DAO or database or service layer), but can't load that object until at least the ID parameter has been loaded. 当您希望将参数直接应用于要从外部加载的对象(例如DAO或数据库或服务层)但在至少加载了ID参数之前无法加载该对象时,这很有用。 By loading the parameters twice, you can retrieve the object in the prepare() method, allowing the second params interceptor to apply the values on the object. 通过两次加载参数,可以在prepare()方法中检索对象,从而使第二个params拦截器可以将值应用于对象。

for details refer to interceptors . 有关详细信息,请参阅拦截器

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM