Will Spring是否支持CDI? [英] Will Spring support CDI?

查看:171
本文介绍了Will Spring是否支持CDI?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



现在,DI和AOP是CDI的标准规范。



如果不支持相关标准,任何好的产品都不能再保持良好状态。 (例如,Hibernate支持JPA规范)



我的问题是,Spring会在将来的版本中支持标准规范(CDI)吗?

解决方案

即使Spring是开源的,由一个大社区使用和支持,其未来的发展由一家公司控制spring source / vmware)。因此,它的决定本质上是非公开的,并且肯定受到许多因素的影响,例如社会的需求,但肯定也是财政和政治方面(最后一天关于钱)。因此,重要的是得出结论,春/泉源不限于任何官方流程(例如JCP),也不能预见未来春天的来源将会决定什么。另一方面,过去的行为导致假设春天来源不是 - 咳嗽 - 特别感兴趣的是实现完整的CDI堆栈(JSR 299)。请记住,尽管Spring源最初加入了JCP for JSR 299(与sun,redhat,google,...一起),但是它们都有一个可怕的战斗,导致了JSR 330的分支,这只是一个子集的JSR 299. Plus:在任何未来版本的spring中实现依赖注入的(有状态)CDI模型将是一个真正的一组工作。



所以,做一个很长的答案:即使我们不知道未来,假设春/泉源将永远不会支持JSR 299作为一个整体,但坚持实施JSR 330是非常安全的。


Spring has been a good framework for DI and AOP for Java developers.

Now, there comes a standard specification for DI and AOP which is CDI.

Any good product can no longer stays good without supporting the relevant standards. (For example, Hibernate supports JPA specification)

My question is, will Spring support the standard specification (CDI) in its future releases?

解决方案

Even though Spring is open source and used and supported by a large community, its future development is controlled by a single company (spring source / vmware). As such, its decisions are inherently non-public and certainly influenced by a large number of factors - like the currents demands of the community, but certainly also financial and political aspects (at the end of the day it's all about money).

So it's important to conclude that spring / spring source is not bound to any official process (such as the JCP would be) and one cannot foresee what spring source will decide in the future. On the other hand, past actions lead to the assumption that spring source is not - cough - specially interested in implementing the full CDI stack (JSR 299). Remember that even though spring source initially joined the JCP for JSR 299 (together with sun, redhat, google, ...), they all had a terrible fight about it which resulted in the fork of JSR 330, which is nothing but a subset of JSR 299. Plus: Implementing the (stateful) CDI model of dependency injection in any future version of spring would be a real bunch of work.

So, to make a long answer short: Even though we don't know about the future, it's pretty safe to assume that spring / spring source will never support JSR 299 as a whole, but stick with their implementation of JSR 330.

这篇关于Will Spring是否支持CDI?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆