Stripes注解官方释义

Stripes是一个视图框架用于利用最新的Java技术来构建Web应用程序.

1.@SessionScope
net.sourceforge.stripes.action.SessionScope
@Target(value={TYPE})
@Retention(value=RUNTIME)
@Documented

Annotation that is used to specify that an ActionBean should be instantiated and stored across requests in the Session scope. By default ActionBeans are instantiated per-request, populated, used and then discarded at the end of the request cycle. Using this annotation causes an ActionBean to live for multiple request cycles. It will be instantiated and put into session on the first request that references the ActionBean. A reference to the bean will also be placed into RequestScope for each request that references the bean, thereby allowing the rest of Stripes to treat it like any other ActionBean.
Since session scope ActionBeans are not generally encouraged by the author, very few allowances will be made in Stripes to accommodate session scope beans. This means that additional mechanisms to handle session scope beans do not exist. However, there are general mechanisms built in to Stripes that will allow you to overcome most if not all issues that arise from Session scoping ActionBeans.

2.@SpringBean
net.sourceforge.stripes.integration.spring.SpringBean
@Target(value={FIELD, METHOD})
@Retention(value=RUNTIME)
@Documented

Annotation used for injecting Spring managed beans into objects within Stripes (usually ActionBeans). The value of the annotation represents the name of the bean in the Spring application context to inject. If the value is omitted then Stripes will attempt to auto-wire first by property/field name and then by type.
Both methods and fields can be annotated. If a field is annotated Stripes will use field access to attempt to inject the bean into the field. If a method is annotated Stripes will attempt to invoke the method and supply it the value to inject. In both cases non-public fields/methods are supported (i.e. values can be injected into private fields and through private methods).


3.@DefaultHandler
net.sourceforge.stripes.action.DefaultHandler
@Target(value={METHOD})
@Retention(value=RUNTIME)
@Documented

Marker annotation to specify that a method within an ActionBean is the default handler for events if a specific event cannot be identified.

  • 0
    点赞
  • 0
    评论
  • 0
    收藏
  • 打赏
    打赏
  • 扫一扫,分享海报

参与评论
请先登录 后发表评论~
©️2021 CSDN 皮肤主题: Age of Ai 设计师:meimeiellie 返回首页

打赏作者

itzyjr

你的鼓励将是我创作的最大动力

¥2 ¥4 ¥6 ¥10 ¥20
输入1-500的整数
余额支付 (余额:-- )
扫码支付
扫码支付:¥2
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值