Skip to content

Auto Binding

Randgalt edited this page Oct 15, 2012 · 20 revisions

Governator can scan your CLASSPATH to do “auto binding”. There are two types of auto binding supported:

  • AutoBindSingleton
  • AutoBind (for injected arguments/fields)

Configuration

Governator will only scan configured packages from the CLASSPATH. Set the packages to use with the usingBasePackages() method of the LifecycleInjectorBuilder.

AutoBindSingleton

Classes annotated with AutoBindSingleton will get auto-bound as Eager Singletons. This