configuration - Override grails.serverURL and application specific grails.propname settings in application.properties file -


grails.serverURL is required to override not Reinstall application wise file I have tried various methods of file grails.serverURL in the settings > application.properties and can not get it to work.

The environment is typical of Config.groovy :

  environment {prod {grails.serverURL = "http: //nonexistentserver.somecompany. com: 8080 "grails.anotherappspecificURL =" xcc: //user:password@server.somecompany.com "}  

in fact, our application.properties this looks like:

  Grails.env = prod grails.war.deployed = true app.grails.version = 1.0.4 app.name = myapp  

In one of the ways below I have attempted to override the settings The Config.groovy are defined:

  grails.serverURL = http: //webserver1.somecompany.com: 8080 grails.anotherappspecificURL = xcc: // admin: Xyzabc123@specificserver.somecompany.com  

Any help to work without code change will be greatly appreciated!

The proper way to override the values ​​in Config.groovy is to use an external property file, see: Specify external property files in Config.groovy, for example:

  grails.config.locations = ["classpath: app- Config.properties "]  

Specify the override value in the properties file (can be stored in grails-app / conf /):

  grails ServerURL = http: //webserver1.somecompany.com: 8080  

At any time you need to change the server URL, a And modify the properties file /web-inf/classes/app-config.properties when deployed to war and reload Kantaks T.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -