Reputation: 1219
I am creating a plugin using Grail 3 (3.2.11). My plugin needs to access different properties (e.g. URLs) for each environment (e.g. development, staging, production). When writing a Grails application I add the properties to the application.yml file. Where do they go in the plugin? I tried adding them to application.yml of the plugin and that does not work as expected. If I add them to the application.yml file of the application using the plugin they work. But I want the properties to be part of the plugin so each person who uses the plugin does not need to provide the properties. I would expect it to work like message properties. Where a plugin can have message properties and an application can override them by providing the same property in their local application message.properties. What am I not understanding.
Upvotes: 2
Views: 656
Reputation: 1172
In the same conf directory as application.yml
you can place a plugin.yml
(or plugin.groovy
) which should allow you to change the plugin configuration similar to the way its done in the application's config file(s).
Upvotes: 3