File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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 Android Security Essentials Live Lessons this week in the Android 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
How to pass an object between MVC controllers?
Spring 3 and Tomcat...newbie question
nonintrusive in spring