There's a couple of ways you can do this:
@Lazy
so a lazy-initialization proxy gets wired instead ObjectProvider
instance instead of your bean type and retrieve the instance manually@PostRefresh
to ensure a single bean gets set after the context has bootstrapped. You can use a @RefreshableCollection
to wire a collection of beans that automatically gets refreshed.See the reference documentation on Refreshing for more information.