We are using Spring 3.0. Here we want to use a HashMap. We want to initialize it when application loads at 1st time. Also it is modifiable at any time from any class. The modification should be available to all other classes across application whoever will use it.
You can define a Map as a @Bean if you wish. But you can not use @Autowire to wire it into your beans, you must use @Resource or @Inject. This is due to the semantics of @Autowired. See https://jira.springsource.org/browse/SPR-8519
Note that HashMap is not thread safe. You might want to consider ConcurrentHashMap