JCP 发布 CDI 1.1 公开评审草案

来源: OSCHINA
编辑: 红薯
2012-11-15

JSR-299 规范简称 CDI(Contexts and Dependency Injection,上下文与依赖注入)

上周 JCP 公布 CDI 1.1 公开评审草案,该草案继续改进 1.0 规范,没有添加新的特性,相反的 JCP 更加专注于完善 CDI 1.0 规范。

主要的调整内容包括:

  • The CDI class, which provides programmatic access to CDI facilities from outside a managed bean
  • Ability to veto beans declaratively using @Vetoed
  • Conversations in Servlet requests
  • Application lifecycle events in Java EE
  • Injection of Bean metadata into bean instances
  • Programmatic access to a container provided Producer, InjectionTarget, AnnotatedType
  • Ability to override attributes of a Bean via BeanAttributes
  • Ability to process modules via ProcessModule
  • Ability to wrap the InjectionPoint
  • Honor WEB-INF/classes/META-INF/beans.xml to activate WEB-INF/classes in a bean archive
  • Global ordering and enablement of interceptors and decorators
  • Global selection of alternatives
  • @New deprecated
  • Clarify interceptors and decorators must be implemented using proxying
  • Allow multiple annotated types per Java class
  • Allow Extensions to specify the annotations that they are interested in
展开阅读全文
1 收藏
分享
加载中
更多评论
0 评论
1 收藏
分享
返回顶部
顶部