Spring can’t autowire Map bean
Starting with Spring 4.3, @Autowired can inject lists and maps and the given code in the question would work: That said, as of 4.3, collection/map and array types can be matched through Spring’s @Autowired type matching algorithm as well, as long as the element type information is preserved in @Bean return type signatures or collection … Read more