I\'ve an Enum class
public enum MyEnum{
ABC;
}
than my \'Mick\' class has this property
private Map
This worked for me...
My Spring application context:
My class where the Map
gets injected:
public class MyClass {
private @Resource Map myMap;
}
The important things to note are that in the Spring context I used SpEL (Spring Expression Language) which is only available since version 3.0. And in my class I used @Resource
, neither @Inject
(it didn't work for me) nor @Autowired
(I didn't try this). The only difference I'm aware of between @Resource
and @Autowired
, is that the former auto-inject by bean name while the later does it by bean type.
Enjoy!