-
Notifications
You must be signed in to change notification settings - Fork 179
Getting Started
Randgalt edited this page Aug 16, 2012
·
27 revisions
Governator is mostly transparent. Use Guice as you normally would but with enhanced features. The major difference is that you now create the Injector through Governator.
Injector injector = LifecycleInjector.builder()
.withModules(yourModules).createInjector();
By creating your Injector this way @PostProcess annotations will be processed.
By adding two more lines of code a number of other Governator enhancements are enabled.
LifecycleManager manager = injector.getInstance(LifecycleManager.class);
manager.start();
Starting the Governator LifecycleManager causes field validation to be processed and the Governator @WarmUp methods to get executed.
- Home
- Getting Started
- Bootstrapping
- Lifecycle Management
- Auto Binding
- Module-Dependencies
- Warm Up
- Configuration Mapping
- Field Validation
- Lazy Singleton
- Concurrent Singleton
- Generic Binding Annotations
- LifecycleListener
- Governator Phases
- Grapher Integration
- JUnit Testing
- FAQ
- Best Practices
- Spring, PicoContainer, Etc.
- Javadoc
- End-to-End Examples