Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Split an object over multiple config files in Spring ?

 
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 ?
 
author
Posts: 396
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.
 
    Bookmark Topic Watch Topic
  • New Topic