有人对我说,Guice是一个安静的微型服务的更好的选择。
我说..。
Spring Boot提供:
- 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是否能/如何提供上面的功能。
非常感谢!
发布于 2017-07-24 00:43:35
Spring上下文是您前面提到的提供“核心Spring支持- DI + AOP”的包。该列表中的其他特性由其他spring包提供。Spring引导将它们封装在一个带有自动配置的包中。
TL;DR spring-context类似于guice,guice本身并不涵盖列表中的其他项目。
https://stackoverflow.com/questions/45270230
复制相似问题