jamesfredley commented on issue #13383: URL: https://github.com/apache/grails-core/issues/13383#issuecomment-5948690866
The unpredictable resolution came from Grails registering its own Micronaut property-source loaders next to Micronaut's. `MicronautYamlPropertySourceLoader` and `MicronautGroovyPropertySourceLoader` were listed in `META-INF/services/io.micronaut.context.env.PropertySourceLoader`. Micronaut keeps one loader per extension when it reads `micronaut.config.files`, and it does not use the loader order, so either Grails' YAML loader or Micronaut's `YamlPropertySourceLoader` was used. The Grails loader only promoted keys nested under `environments.<env>`. Micronaut's loader only read top-level keys. Which file layout worked depended on classpath order. Both classes and that service file were removed with the Micronaut parent context in `ebda0f8b5b` (2024-09-24), https://github.com/apache/grails-core/pull/13685. On `8.0.x` there is no `io.micronaut.context.env.PropertySourceLoader` service entry. Micronaut is started through the `grails-micronaut` plugin and micronaut-spring-starter, and beans see the Spring environment: https://docs.grails.org/latest/guide/upgrading.html That commit is in the 7.0.0 line from `v7.0.0-M1` through `v7.2.4`, except `v7.0.16`, and in `v8.0.0-M1` through `v8.0.0-RC2`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
