Spring 5.0 Cookbook
上QQ阅读APP看书,第一时间看更新

Creating an inner bean

When there are beans that can only be called once by some certain top-level beans, it will be easier to manage the ApplicationContext definition if we allow these objects to be inner beans. This recipe will show you how to create inner beans to some objects that exclusively use them.