Skip to content

Object configuration steps

Suremaker edited this page Dec 10, 2012 · 13 revisions

The Spring.FluentContext allows to construct object definition with following steps:

  1. Definition registration *
  2. Scope definition
  3. [Indirect dependencies definition](Indirect object dependencies)
  4. Object Instantiation
  5. Lookup Method Injection **
  6. Autowiring
  7. Dependency Injection
  8. Initialization Behavior
  9. Finalization Behavior
  10. Dependency checking
  11. Definition referencing

* If RegisterXXXSingleton() method group is used, 2-10 construction steps would be skipped.

** This step is only accessible if object instantiation is not explicitly specified or is specified by using BindConstructorArg(), UseConstructor()

The API is constructed in this way, that:

  • if given step offers different options, it is possible to select only one of them,
  • it is possible to skip given step, if it is meaningless for given configuration case
  • it is not possible to go back to previous construction step.

Described functionality dramatically decreases chances of creating inconsistent configuration

Clone this wiki locally