You can annotate a Collection<>
property with @RefreshableCollection
. This will update the collection of members after the entire context has bootstrapped. All exposed beans matching the member type will be added.
Alternatively you can use the AcrossContextBeanRegistry
component to retrieve beans from an Across context at any point in time.