Created
September 24, 2021 14:27
-
-
Save jeffscottbrown/9e51efe95119505e1bfbb297e5927e09 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 java.util.List; | |
| @ConfigurationProperties("server") | |
| public class CountryConfig { | |
| private List<CountryProps> list; | |
| public List<CountryProps> getSettings() { | |
| return list; | |
| } | |
| public void setSettings(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