Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- customers:
- UniqueProductName1:
- SubscriptionPlan1:
- User1: {payment:150, limit: 200}
- User2: {payment:200, limit: 300}
- User3: {payment:60, limit: 100}
- SubscriptionPlan2:
- User1: {payment:150, limit: 200}
- User2: {payment:200, limit: 300}
- User5: {payment:150, limit: 200}
- UniqueProductName2:
- SubscriptionPlan1:
- User6: {payment:150, limit: 200}
- User7: {payment:200, limit: 300}
- User4: {payment:60, limit: 100}
- SubscriptionPlan2:
- User5: {payment:150, limit: 200}
- User8: {payment:200, limit: 300}
- User9: {payment:150, limit: 200}
- SubscriptionPlan3:
- User5: {payment:150, limit: 200}
- User8: {payment:200, limit: 300}
- User10: {payment:150, limit: 200}
- <dependency>
- <groupId>com.fasterxml.jackson.dataformat</groupId>
- <artifactId>jackson-dataformat-yaml</artifactId>
- <version>2.8.3</version>
- </dependency>
- @Configuration
- @EnableConfigurationProperties
- @ConfigurationProperties("customers")
- public class MainYaml {
- public List<CustomerProduct> customerProductList;
- //getter and setter
- public class CustomerProduct{
- public String productName;
- public List<CustomerPlan> customerPlansList;
- //getter and setter
- public class CustomerPlan{
- public String customerName;
- public List<CustomerDetail> customerDetailsList;
- //getter and setter
- public class CustomerDetail {
- @JsonProperty
- public String payment;
- @JsonProperty
- public String limit;
Add Comment
Please, Sign In to add comment