struts2中interceptor命名的新变化

按照struts2.0.8文档的说法,从struts2.0.7版本开始(当然我们能看到只是2.0.8,因为struts2的奇数版本号一般是内部测试版本,不会发布的),struts2的interceptor一律采用camelCase(驼峰:除了第一个,每个单词大写开头)命名,当然目前(2.0.8)还是可以使用中划线命名,而在2.1.0版本中将会完全删除中划线的命名的intercepter ,具体涉及到的interceptor如下(struts-default.xml的截取内容):
<!--  Deprecated name forms scheduled for removal in Struts 2.1.0. The camelCase versions are preferred. See ww-1707  -->
< interceptor  name ="external-ref"  class ="com.opensymphony.xwork2.interceptor.ExternalReferencesInterceptor" />
< interceptor  name ="model-driven"  class ="com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor" />
< interceptor  name ="static-params"  class ="com.opensymphony.xwork2.interceptor.StaticParametersInterceptor" />
< interceptor  name ="scoped-model-driven"  class ="com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor" />
< interceptor  name ="servlet-config"  class ="org.apache.struts2.interceptor.ServletConfigInterceptor" />
< interceptor  name ="token-session"  class ="org.apache.struts2.interceptor.TokenSessionStoreInterceptor" />
估计以后设计到命名变化不止这些,可能只要是有中划线"-"的命名都会改为"驼峰"的方式
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值