Grails-Plugin-Consortium / grails-cxf-client

Easy cxf client for grails
http://grails.org/plugin/cxf-client
27 stars 30 forks source link

dynamic configuration question #51

Closed nardhar closed 9 years ago

nardhar commented 9 years ago

I'm about to use this plugin but I wouldn't like to have the configuration in Config.groovy (mostly because don't want to keep the user, password and even the serviceEndpointAddress in sourcecode) what would be the best approach?

ctoestreich commented 9 years ago

You can store the information in a properties file that is put on the classpath. This is accomplished by add this to the config.groovy

grails.config.locations = ["config_file_1.properties", "config_file_2.properties", ..] 

I just added some tests for this int eh cxf client plugin. You can see how to set properties here

https://github.com/Grails-Plugin-Consortium/grails-cxf-client/blob/master/grails-app/conf/config.properties

nardhar commented 9 years ago

ok, but what if I wanted to change the serviceEndpointAddress on runtime? is there a way it can be done?