概述:
Guice是一个轻量级,基于Java5(主要运用泛型与注释特性)的依赖注入框架(IOC)。Guice非常小而且快。Guice是类型安全的,它能够对构造函数,属性,方法(包含任意个参数的任意方法,而不仅仅是setter方法)进行注入。Guice还具有一些可选的特性比如:自定义scopes,传递依赖,静态属性注入,与Spring集成和AOP联盟方法注入等。
项目主页: http://code.google.com/p/google-guice/
官方:
google-guice
Guice (pronounced 'juice') is a lightweight dependency injection framework for Java 5 and above, brought to you by Google.
Guice
Put simply, Guice alleviates the need for factories and the use of new in your Java code. Think of Guice's@Inject as the new new. You will still need to write factories in some cases, but your code will not depend directly on them. Your code will be easier to change, unit test and reuse in other contexts.
Guice embraces Java's type safe nature, especially when it comes to features introduced in Java 5 such as generics and annotations. You might think of Guice as filling in missing features for core Java. Ideally, the language itself would provide most of the same features, but until such a language comes along, we have Guice.
Guice helps you design better APIs, and the Guice API itself sets a good example. Guice is not a kitchen sink. We justify each feature with at least three use cases. When in doubt, we leave it out. We build general functionality which enables you to extend Guice rather than adding every feature to the core framework.
Guice aims to make development and debugging easier and faster, not harder and slower. In that vein, Guice steers clear of surprises and magic. You should be able to understand code with or without tools, though tools can make things even easier. When errors do occur, Guice goes the extra mile to generate helpful messages.
For an introduction to Guice and a comparison to new and the factory pattern, see Bob Lee's video presentation. After that, check out our user's guide.
We've been running Guice in mission critical applications since 2006, and now you can, too. We hope you enjoy it as much as we do.
分享到:
相关推荐
赠送jar包:guice-4.0.jar; 赠送原API文档:guice-4.0-javadoc.jar; 赠送源代码:guice-4.0-sources.jar; 赠送Maven依赖信息文件:guice-4.0.pom; 包含翻译后的API文档:guice-4.0-javadoc-API文档-中文(简体)版...
guice.jar guice.jar guice.jar guice.jar guice.jar guice.jar guice.jar
**基于Guice的简单项目** 在Java开发中,依赖注入(Dependency Injection,简称DI)是一种设计模式,它有助于降低代码间的耦合度,提高代码的可测试性和可维护性。Guice是Google提供的一款轻量级的DI框架,它简化了...
### Guice用户中文指南 #### 一、简介 Guice是一个专门为Java 5及后续版本设计的超轻量级依赖注入框架。它旨在简化应用程序组件之间的依赖管理,并提供了一个更为简洁、灵活的方式来处理对象间的耦合关系。Guice的...
"google Guice 1.0 用户指南 中文" Guice 是一个超轻量级的、下一代的、为 Java 5 及后续版本设计的依赖注入容器。它可以帮助 Java 企业应用开发社区解决连接对象方面的问题,例如 Web 应用如何访问中间层服务、...
**Guice 概述** Guice 是 Google 推出的一款轻量级的依赖注入框架,专为 Java 5 及其后续版本设计。依赖注入(Dependency Injection,简称 DI)是一种设计模式,它允许开发者在不直接创建对象的情况下,将依赖关系...
Guice,全称为Google Guice,是一款由Google开发的轻量级依赖注入(Dependency Injection,简称DI)框架,主要用于简化Java应用的初始化和组件管理。依赖注入是一种设计模式,它可以帮助开发者解耦代码,提高软件的...
赠送jar包:guice-multibindings-3.0.jar; 赠送原API文档:guice-multibindings-3.0-javadoc.jar; 赠送源代码:guice-multibindings-3.0-sources.jar; 赠送Maven依赖信息文件:guice-multibindings-3.0.pom; ...
Guice-3.0是Guice的一个版本,包含了核心库guice-3.0.jar,以及与Spring和Struts2集成的扩展库guice-spring-3.0.jar和guice-struts2-plugin-3.0.jar。 1. **Guice核心概念**: - **依赖注入**:Guice的核心机制,...
赠送jar包:guice-3.0.jar; 赠送原API文档:guice-3.0-javadoc.jar; 赠送源代码:guice-3.0-sources.jar; 赠送Maven依赖信息文件:guice-3.0.pom; 包含翻译后的API文档:guice-3.0-javadoc-API文档-中文(简体)-...
Google Guice,全称为GoogleInject,是一个轻量级的依赖注入框架,由Google开发并开源。Guice的目标是简化Java应用程序的构造和管理,通过自动装配对象依赖关系,让开发者可以专注于业务逻辑而不是对象的创建和组装...
### Google Guice: 敏捷轻量级依赖注入框架详解 #### 一、引言与背景 在现代软件开发中,依赖注入(Dependency Injection, DI)已成为构建灵活、可维护和可测试应用程序的重要手段之一。Google Guice作为一款100%...
赠送jar包:guice-3.0.jar; 赠送原API文档:guice-3.0-javadoc.jar; 赠送源代码:guice-3.0-sources.jar; 赠送Maven依赖信息文件:guice-3.0.pom; 包含翻译后的API文档:guice-3.0-javadoc-API文档-中文(简体)版...
### Apache Shiro 与 Guice 集成详解 #### 概述 在现代软件开发过程中,集成不同的框架和技术是常见的需求。Apache Shiro 是一个强大的、易用的 Java 安全框架,提供了认证、授权、加密和会话管理功能。而 Google ...
赠送jar包:guice-multibindings-3.0.jar; 赠送原API文档:guice-multibindings-3.0-javadoc.jar; 赠送源代码:guice-multibindings-3.0-sources.jar; 赠送Maven依赖信息文件:guice-multibindings-3.0.pom; ...
赠送jar包:guice-assistedinject-3.0.jar; 赠送原API文档:guice-assistedinject-3.0-javadoc.jar; 赠送源代码:guice-assistedinject-3.0-sources.jar; 赠送Maven依赖信息文件:guice-assistedinject-3.0.pom;...
Guice,全称为Google Guice,是Google推出的一款轻量级的依赖注入(Dependency Injection,简称DI)框架,专门用于简化Java应用中的对象组装和管理。依赖注入是一种设计模式,它可以帮助开发者降低代码间的耦合,...
### Google Guice 用户手册知识点详解 #### 一、Google Guice 概览 **Google Guice** 是一个轻量级的 Java 依赖注入容器,它为 Java 5 及以上版本提供支持。与传统的对象创建方式相比,Guice 通过减少样板代码...
Google Guice是一个轻量级的依赖注入框架,由Google开发并维护,主要用于简化Java应用程序的构建和管理。依赖注入(Dependency Injection,简称DI)是一种设计模式,它可以帮助开发者减少代码间的耦合,提高代码的可...