首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Guice诉Spring Boot

Guice诉Spring Boot
EN

Stack Overflow用户
提问于 2017-07-23 21:54:44
回答 1查看 2.1K关注 0票数 0

有人对我说,Guice是一个安静的微型服务的更好的选择。

我说..。

Spring Boot提供:

代码语言:javascript
复制
- Core Spring Support - DI + AOP 
- Auto-Configuration: Web, Rest, Data, etc
- Activation Profiles: activate bits of code based on profiles 
- Simplified Web Development: code driven, no xml, no web.xml etc
- Web Testing Support: successful testing is easy testing
- Security Support: out of the box that can be customized
- JMS: out of the box support and can be excluded if not needed
- Actuator: health, trace, beans, info + much more etc 
- Executable and deployable WARs
- Natural fit for restful micro-services
- Fast loading
- extensible, native cloud support and much more

在一个真正的web应用程序中,这些特性是在开发和部署到生产过程中所需要的。

Guice抱怨Spring的旧版本,以及加载速度慢、程序员出错等问题。

从我的阅读资料来看,Guice是为拥有许多开发人员的超大应用程序创建的,在这种情况下,使用Spring之类的工具可能需要更长的时间来加载。Guice是一个DI框架,它为您提供了如何快速加载应用程序代码的细粒度控制。

现在我还没有使用Guice,也还不知道Guice,能不能有人组成Guice阵营来教我Guice是否能/如何提供上面的功能。

非常感谢!

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-07-24 00:43:35

Spring上下文是您前面提到的提供“核心Spring支持- DI + AOP”的包。该列表中的其他特性由其他spring包提供。Spring引导将它们封装在一个带有自动配置的包中。

TL;DR spring-context类似于guice,guice本身并不涵盖列表中的其他项目。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/45270230

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档