diff --git a/spring-boot-modules/spring-boot-properties-2/src/main/java/com/baeldung/properties/yamllist/pojo/ApplicationProps.java b/spring-boot-modules/spring-boot-properties-2/src/main/java/com/baeldung/properties/yamllist/pojo/ApplicationProps.java new file mode 100644 index 0000000000..18a4d569b9 --- /dev/null +++ b/spring-boot-modules/spring-boot-properties-2/src/main/java/com/baeldung/properties/yamllist/pojo/ApplicationProps.java @@ -0,0 +1,71 @@ +package com.baeldung.properties.yamllist.pojo; + +import java.util.List; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.stereotype.Component; + +@Component +@ConfigurationProperties(prefix = "application") +public class ApplicationProps { + + private List profiles; + private List> team; + private List users; + + public List getProfiles() { + return profiles; + } + + public void setProfiles(List profiles) { + this.profiles = profiles; + } + + public List> getTeam() { + return team; + } + + public void setTeam(List> team) { + this.team = team; + } + + public List getUsers() { + return users; + } + + public void setUsers(List users) { + this.users = users; + } + + public static class User { + + private String username; + private String password; + private List roles; + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public List getRoles() { + return roles; + } + + public void setRoles(List roles) { + this.roles = roles; + } + + } +} \ No newline at end of file