JSR 299 建议草案第二版已提交

JSR 299 建议草案第二版已提交,第1张

昨天 Gavin King 提交了 JSR 299 (Contexts and Dependency Injection for the Java EE platform)的第二个建议草案 给 JCP。相比上一个建议草案,主要有如下四个大的修订:

  1. 在依赖注射注解(annotation)上全面采用 JSR 330
  2. 在部署类型上使用 @alternative 代替了原来的 @Production / @Standard
  3. 移除了动态注册事件观察者的能力
  4. 对 EJB Session Beans 进行构造器注射

从使用者的角度上看,最大的改变就是可以对 Bean 构造器、初始化方法以及字段使用 @Inject 注解进行依赖注射。另外一些小的修改(比如 @Named 也作为一种限定器)详见当前版本的 JSR 299 草案。另外,JSR 330 投票应该是全票通过了。

PS. JSR 330 投票结果:

JSR #330
Dependency Injection for Java
Public Review Ballot

These are the final results of the Public Review Ballot for JSR #330. The Executive Committee for SE/EE has approved this ballot.

Votes SE/EE Apache Software Foundation Eclipse Foundation, Inc Ericsson AB Fujitsu Limited Google Inc. Hewlett-Packard IBM Intel Corp. Keil, Werner Lea, Doug Nortel Oracle RedHat SAP AG SpringSource Sun Microsystems, Inc.
Icon Legend Yes No Abstain Not voted

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/2083742.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-07-22
下一篇 2022-07-22

发表评论

登录后才能评论

评论列表(0条)

保存