my dog learned polymorphism*
The moose likes Other Application Frameworks and the fly likes Split an object over multiple config files in Spring ? 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 » Other Application Frameworks
Bookmark "Split an object over multiple config files in Spring ?" Watch "Split an object over multiple config files in Spring ?" New topic
Author

Split an object over multiple config files in Spring ?

Brian Quinn
Ranch Hand

Joined: Dec 23, 2003
Posts: 32
I have an object that contains 4 maps, all of which are rather large amounts of static data. I would like to split the maps up into separate files, but you can make a map a bean, so I can't have <property name="map1" ref="map1Bean"> or at least I can't tell that I can.

this is what I have


I would like to do this so I can put maps in separate files



Is this possible ?
Craig Walls
author
Ranch Hand

Joined: Sep 19, 2003
Posts: 301
If you're using Spring 2, you can create maps as beans using the <util:map> configuration element.

First, you'll need to add the util namespace:



Then, create your map:



Then you can wire "myMap" into a Map property.


Spring in Action - Unleash POJO power in your applications!
Modular Java - Discover the secret weapon to modularity on the Java platform!
XDoclet in Action - Your complete guide to code generation with XDoclet.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Split an object over multiple config files in Spring ?
 
Similar Threads
Please explain the logic
Dynamic Column List?
Transactions with Spring and Hibernate
HashMap Problem
Multi DataBase Connectivity with Spring and Jdbc