This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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