谷歌杜松子酒?与弹簧一起使用?

发布于 2024-08-03 12:34:16 字数 75 浏览 10 评论 0原文

我知道杜松子酒是 guice 的客户端。所以才能使用杜松子酒。必须和guice一起使用吗?我想知道,它可以与 spring 一起使用吗?

i know gin is client side of guice . so in order to use gin. it must be used together with guice? i wonder, can it be used with spring?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

獨角戲 2024-08-10 12:34:16

SpringIntegration

据我了解,这利用了 GWT Java-to-JavaScript 编译器,所以下一个问题是 Spring 是否可以与 GWT 一起使用。如果确实如此,我认为你最好直接使用 Spring,而不是跳过这个额外的环节。

SpringIntegration?

As I understand it this makes use of the GWT Java-to-JavaScript compiler, so the next question is does Spring work with GWT. If it does I think you would be better off using Spring directly rather than jumping through this additional hoop.

乖不如嘢 2024-08-10 12:34:16

来自 gwt-gin 常见问题解答:

GIN 在编译时通过
GWT 生成器。生成器创建
Ginjector 的实现
接口。

因此,guice 是内置的,无法替代。除了向 GWT 模块添加必要的 jar 之外,在使用 gin 时您根本不需要了解 guice。当然,使用 gin 与使用 guice 非常相似......

From the gwt-gin Faq:

GIN uses Guice at compile-time via a
GWT Generator. The generator creates
an implementation of your Ginjector
interfaces.

Thus guice is built-in and no substitution is possible. Besides adding necessary jars to your GWT module you not need to know about guice at all when using gin. Of course, using gin is very similar to using guice...

咿呀咿呀哟 2024-08-10 12:34:16

因此 guice 是内置的,没有
替代是可能的。除了
将必要的 jar 添加到您的 GWT
你不需要了解的模块
使用杜松子酒时根本没有任何建议。的
当然,使用杜松子酒非常类似于
使用指南...

只是一点说明(来源:GIN 主页):

GIN 构建在 Guice 之上并使用
Guice 绑定(的子集)
语言。

因此,将 GIN 视为在 GWT 项目中使用 Guice 的一种方式 - 大多数有关 Guice 的教程、视频等都可以与 Gin 配合使用。请注意,GIN 站点在 wiki 部分中没有任何有关实际 DI 的教程 - 这是因为 Guice wiki 中的所有内容都适用于此 - 但有一些例外(主要是高级内容)。如果您想了解差异,请检查 Guice 兼容性

Thus guice is built-in and no
substitution is possible. Besides
adding necessary jars to your GWT
module you not need to know about
guice at all when using gin. Of
course, using gin is very similar to
using guice...

Just a little clarification (source: GIN homepage):

GIN is built on top of Guice and uses
(a subset of) Guice's binding
language.

Thus, think of GIN as a way to use Guice in your GWT projects - most of the tutorials, videos, etc concerning Guice will work with Gin. Note that the GIN site doesn't have any tutorials on actual DI in the wiki part - that's because everything from the Guice wiki applies here - with some exceptions (mostly advanced stuff). If you want to know the differences, check Guice Compatibility.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文