I have the below Spring configuration in an XML file:
<util:map id="myService">
<entry key="s1" value-ref="goodService" />
<entry key="s2" value-ref="betterService" />
</util:map>
is there a way to migrate this to Annotation based configuration, i.e.
@Bean
public Map<String, MyService> serviceMap() {
Map<String, MyService> map = new HashMap<>();
...
So the values in the Map are references to beans.