Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Micronaut configuration properties cannot be loaded with external-config grails-plugin #50

Closed
andersaaberg opened this issue Aug 13, 2020 · 1 comment

Comments

@andersaaberg
Copy link
Contributor

In one of my projects, I'm using @ConfigurationProperties from Micronaut and that works very well... except when I put the configuration properties in an external configuration file and attempt to load the external configuration file using external-config grails plugin.

Here is a repo that reproduces the problem: https://github.com/andersaaberg/external-config-micronaut-configuration-property
If you start the application using ./gradlew bootRun, then it fails on upstart because @ConfigurationProperties does not receive the configuration from the external configuration file external-config/my-external-config.yml

However, the application starts up without any issue, if I comment out "- classpath:my-external-config.yml" in application.yml and comment in "my.number: 42".

Using application.yml is not really an option for me as I wish to put the properties in external config files. It work with external propertiy files if I use the JVM arguments "-Dspring.config.additional-location" + "-Dmicronaut.config.files", but I strongly prefer to use the external-config grails plugin.

@andersaaberg
Copy link
Contributor Author

I can confirm that this issue is fixed on 2.0.1, when I upgraded to latest Grails and used "dk.glasius:external-config:2.0.1" as dependency

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant