This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Svelte and Sapper in Action and have Mark Volkmann on-line!
See this thread for details.
Win a copy of Svelte and Sapper in Action this week in the 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
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Dynamic Property File Loading in Spring based on the URL Argument.

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I am working in a environment which needs to load/change the property files based on the URL argument. But the problem is based on the configuration all the property files are loading before getting the URL argument.

Consider that My root-context.xml file contains the configuration like following...


I am loading the property files from the classpath by default...
After complete build of application and I will deploy the application in server and runs it. When I am sending the request I will send some argument as "c=um" as part of url. So I need to get this argument and change the property file based on this argument or load the property files.

The Questions are: Can I change the name of the property file in configuration

After changing the name can I reload the property files with out restarting the application.
 
Greenhorn
Posts: 2
Hibernate MySQL Database Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Instead of changing filename in configuration file.

load properties file programatically



Vinit
 
Naresh Tota
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, We can load the properties programmatically, but its not the case. After successful build of application, for the first request I need to get an argument from the URL, and based on that argument I have to load the properties i.e, my application has to run with new properties instead of old properties which are loaded before getting the URL argument.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic