aspose file tools*
The moose likes Spring and the fly likes Inject hashmap into controller Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Inject hashmap into controller" Watch "Inject hashmap into controller" New topic
Author

Inject hashmap into controller

Gilbert Jones
Greenhorn

Joined: Dec 15, 2011
Posts: 1
I'm pretty new to Spring. I'm trying to inject a hashmap defined in a properties file into a field in a controller defined with @controller annotation. I'm not sure how to do this, so any suggestions would be welcome.

I also tried to define the keys and values directly in the spring config file, they were injected correctly into the class initially, but the map was wiped out since the controller was recreated through the controller annotation.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Inject hashmap into controller
 
Similar Threads
nonintrusive in spring
Spring 3 and Tomcat...newbie question
How to pass an object between MVC controllers?