I would like to retrieve a component from a module that is bootstrapped later.

There's a couple of ways you can do this:

  • Spring mechanisms to retrieve the actual bean instance upon first use:
    • demarcate your property as @Lazy so a lazy-initialization proxy gets wired instead 
    • use an ObjectProvider instance instead of your bean type and retrieve the instance manually
  • You can use @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.