Created
September 24, 2021 14:16
-
-
Save jeffscottbrown/dd3067eb00b0170ac1242ab6de2577ce to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import io.micronaut.context.annotation.ConfigurationProperties; | |
| import io.micronaut.context.annotation.EachProperty; | |
| import jakarta.inject.Inject; | |
| import java.util.List; | |
| @ConfigurationProperties("server") | |
| public class CountryConfig { | |
| private List<CountryProps> list; | |
| public List<CountryProps> getList() { | |
| return list; | |
| } | |
| @Inject | |
| public void setList(List<CountryProps> list) { | |
| this.list = list; | |
| } | |
| @EachProperty(list=true, value = "settings") | |
| public static class CountryProps { | |
| private String country; | |
| private String host; | |
| public String getCountry() { | |
| return country; | |
| } | |
| public void setCountry(String country) { | |
| this.country = country; | |
| } | |
| public String getHost() { | |
| return host; | |
| } | |
| public void setHost(String host) { | |
| this.host = host; | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment