I recently switched from using Spring\'s XML configuration to its Java configuration and am encountering a strange issue.
The XML configuration was:
There is an issue @Autowired
-ing a Map even defining the bean name and since as-per the comments you can't use the suggested @Resource
annotation there is an alternative by using the @Value
annotation defining the bean name:
@Bean
public MyClass myBean(@Value("#{myMap}") final Map myMap) {
//..
}