• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
  • Mike London

Unable to update the map defined in spring application config in java class

Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, currently I've got a map defined in my spring config. I'm doing a constructor injection on a Injector class and sending my map to the class. Inside the class I'm making changes to the code and adding values to the map. The issue I'm facing is that when I'm trying to get the same map in some other class it is not picking up the added values instead it has just the default values that have been added. Here are the code snippets

Wont the spring ensure that as I'm passing the map by reference instead of value, all the modifications done on the map in the class will be available throughout the application. Only thing i would need to do is to @Autowire this map and use it.???
    Bookmark Topic Watch Topic
  • New Topic