Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Split an object over multiple config files in Spring ?

 
Brian Quinn
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 363
8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic