You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
The ConfigurationProperties annotation injects null values when is used to decorate a Bean method in a Configuration class. I have forked the repository and added an example bean which is configured using the configuration properties annotation. The bean values are populated correctly using only Spring Boot dependencies but the bean configuration properties are populated with null values when Micronaut is used. Here is the commit with the example: igarciaes@1fb0d4b
I am missing something?
Thanks!
The text was updated successfully, but these errors were encountered:
igarciaes
changed the title
The @ConfigurationProperties annotation inject null values when decorates a @Bean method in a @Configuration class
The @ConfigurationProperties annotation injects null values when decorates a @Bean method in a @Configuration class
Mar 22, 2019
We don't currently support returning @ConfigurationProperties from a @Configuration method. You would need to define the @ConfigurationProperties on the class itself
Ok, thanks @graemerocher for your quick reply.
Then, if is not possible to use the @ConfigurationProperties annotation for bean factory methods in a @Configuration annotated class, could you please describe which would be the code refactoring using Micronaut for cases where the configuration values are injected directly to the bean returned by a factory method:
Hi,
The ConfigurationProperties annotation injects null values when is used to decorate a Bean method in a Configuration class. I have forked the repository and added an example bean which is configured using the configuration properties annotation. The bean values are populated correctly using only Spring Boot dependencies but the bean configuration properties are populated with null values when Micronaut is used. Here is the commit with the example:
igarciaes@1fb0d4b
I am missing something?
Thanks!
The text was updated successfully, but these errors were encountered: