Andrey Yaskulsky
Andrey Yaskulsky

Reputation: 2516

grails externalized configuration chaning on the fly

I'm trying to externalize my app configuration and make it possible to reload some values on the fly. For example - I'm using email plugin and want to externalize my mail box configuration and be able to change it without restarting the server. I've used

grails.config.locations = ["file:somedir/some-properties.properties"]

and discovered that properties are loaded properly. I use grailsApplication.configuration.property.name expression to access my properties. But I've found out that if to load application and then change some property in the file then in the application this property will have old value. Is there a way to make app load new properties from the file every time?

Upvotes: 0

Views: 72

Answers (1)

Lalit Agarwal
Lalit Agarwal

Reputation: 2354

Try using the below plugin, it should solve your problem

http://grails.org/plugin/external-config-reload

Upvotes: 2

Related Questions