Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 11 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(4)
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.
CDI? (与 Guice 几乎相同,但是 JSR 而不是专有的)
CDI? (almost the same thing as Guice, but is a JSR rather than proprietary)
Guice?
Guice?
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.