Java 的轻量级 ioc 容器?

发布于 2024-10-22 20:31:20 字数 1536 浏览 8 评论 0原文

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

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

发布评论

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

评论(4

薄暮涼年 2024-10-29 20:31:21

Pico 容器google-guice。请参阅此处的比较

顺便说一句,很少有人会称 spring 为“轻量级”,但它可以只具有基本功能。因此它包含在上面的比较中。

Pico container or google-guice. See a comparison here.

Btw, few people will call spring "ligthweight", but it can be used as such with only the basic features. Hence it's included in the above comparison.

沉溺在你眼里的海 2024-10-29 20:31:21

CDI? (与 Guice 几乎相同,但是 JSR 而不是专有的)

CDI? (almost the same thing as Guice, but is a JSR rather than proprietary)

悟红尘 2024-10-29 20:31:21

Silk DI 是一个 120K jar,无需进一步的运行时依赖项。因此,它比 guice 或 spring 更轻,并且比 pico 容器更小,但具有更强大的功能集。此外,它不会通过将功能拆分到单独的附加 jar 中来作弊,例如用于 guice 的 multibind 或用于 pico-container 的 gems。

Silk DI is a 120K jar with no further runtime dependencies needed. So it is way more lightweight than e.g. guice or spring and still smaller as pico-container but has an even more powerful feature set. Also it doesn't cheat by splitting features into a separate additional jars like multibind for guice or the gems for pico-container.

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