[spring] Add beans in hierarchical application contexts.