-
Hello, i am trying to have this configuration in my application.yaml:
For this i have such a POJO:
this config mapping class:
And a PersonConverter class which is now just printing the incoming string. {"birthdays": [{"name": "John" Is this a bug or i doing something wrong? <quarkus.platform.version>2.13.3.Final</quarkus.platform.version> |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Sorry for the late reply. I've missed this. You don't need a Composed elements are handled automatically, so you need to define your mapping as follows: @ConfigMapping(prefix = "app")
public interface BirthdayConfig {
List<Person> birthdays();
interface Person {
String name();
String date();
}
} And it will work out of the box. |
Beta Was this translation helpful? Give feedback.
Sorry for the late reply. I've missed this.
You don't need a
Converter
for this. AConverter
is only suited to convert single-element values, not composed elements.Composed elements are handled automatically, so you need to define your mapping as follows:
And it will work out of the box.