浏览 2571 次
锁定老帖子 主题:Weld中实现ViewScoped
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
|
|
---|---|
作者 | 正文 |
发表时间:2010-01-10
最后修改:2010-01-10
原文地址:http://www.verborgh.be/articles/2010/01/06/porting-the-viewscoped-jsf-annotation-to-cdi/ Porting the ViewScoped JSF annotation to CDI As you might know, JavaServer Faces 2 comes with some optional annotations. Optional, because halfway throught the specification process something called Dependency Injection for Java (JSR330) and something else called Context and Dependency Injection or CDI (JSR299) came to life. That means we have some very usefull annotations like @ViewScoped that are specified in the JSF 2 specification that have no alternatives in CDI. ...... 附注,文中提到的javax.enterprise.inject.spi.Extension文件,内容应该写我们事先的Extension的全类名,放在WEB-INF/classes/META-INF/services下。 关于javax.enterprise.inject.spi.Extension的相关信息,见GK老大的文字和Weld的文档: http://in.relation.to/Bloggers/CDIPortableExtensionExamples 声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |