Here is my Yaml properties file
bb:
employees:
-
employee1:
name: Syed
locations:
- HYD
- MAA
-
employee2:
name: Adhil
locations:
- BOM
- DEL
I want to convert the object into my POJO in my applicaiton. However I'm not able to do it, it always returns null.
Is there anything which I'm missing?
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Configuration
@ConfigurationProperties(prefix = "bb")
public class EmpConfig {
EmployeeDetails employees;
}
EmployeeDetails Class
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Configuration
public class EmployeeDetails {
List<Map<String, List<String>>> details;
}
