Skip to content
Discussion options

You must be logged in to vote

Sorry for the late reply. I've missed this.

You don't need a Converter for this. A Converter 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:

@ConfigMapping(prefix = "app")
public interface BirthdayConfig {
    List<Person> birthdays();

    interface Person {
        String name();
        String date();
    }
}

And it will work out of the box.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by radcortez
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants