将GWT与CDI(焊缝/焊缝) [英] integrating GWT with CDI (Seam/Weld)

查看:109
本文介绍了将GWT与CDI(焊缝/焊缝)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将CDI与GWT整合的最佳方法是什么?特别是,我想知道如何为我的RemoteServiceServlet扩展进行依赖注入工作。显然,CDI不能使用派生自javax.servlet.Servlet的类。如果有其他选择,我很高兴能够抛弃RemoteServiceServlet。

What's the best way to integrate CDI with GWT? In particular, I'd like to know how to make dependency injection work for my RemoteServiceServlet extensions. Apparently CDI won't work with classes derived from javax.servlet.Servlet. I'm happy to ditch RemoteServiceServlet if there is an alternative.

我并不真的需要在GWT客户端上使用DI,但如果它只是使用它工作。

I don't really need DI on the GWT client-side, but would happily use it if it Just Worked.

推荐答案

原来是 Weld中的错误,已在1.1.0版本中修复。

It turns out to be a bug in Weld, which is already fixed in version 1.1.0.

Intellij IDEA X也有这个错误,因为如果您尝试使用RemoteServiceServlet执行此操作,它会将其标记为错误。我只是禁用了检查。

Intellij IDEA X also has this "bug", as it flags it as an error if you try to do this with a RemoteServiceServlet. I just disabled the inspection for that.

这篇关于将GWT与CDI(焊缝/焊缝)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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