Guest User

Untitled

a guest
Nov 24th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. customers:
  2. UniqueProductName1:
  3. SubscriptionPlan1:
  4. User1: {payment:150, limit: 200}
  5. User2: {payment:200, limit: 300}
  6. User3: {payment:60, limit: 100}
  7. SubscriptionPlan2:
  8. User1: {payment:150, limit: 200}
  9. User2: {payment:200, limit: 300}
  10. User5: {payment:150, limit: 200}
  11. UniqueProductName2:
  12. SubscriptionPlan1:
  13. User6: {payment:150, limit: 200}
  14. User7: {payment:200, limit: 300}
  15. User4: {payment:60, limit: 100}
  16. SubscriptionPlan2:
  17. User5: {payment:150, limit: 200}
  18. User8: {payment:200, limit: 300}
  19. User9: {payment:150, limit: 200}
  20. SubscriptionPlan3:
  21. User5: {payment:150, limit: 200}
  22. User8: {payment:200, limit: 300}
  23. User10: {payment:150, limit: 200}
  24.  
  25. <dependency>
  26. <groupId>com.fasterxml.jackson.dataformat</groupId>
  27. <artifactId>jackson-dataformat-yaml</artifactId>
  28. <version>2.8.3</version>
  29. </dependency>
  30.  
  31. @Configuration
  32. @EnableConfigurationProperties
  33. @ConfigurationProperties("customers")
  34. public class MainYaml {
  35.  
  36. public List<CustomerProduct> customerProductList;
  37.  
  38. //getter and setter
  39.  
  40. public class CustomerProduct{
  41. public String productName;
  42. public List<CustomerPlan> customerPlansList;
  43.  
  44. //getter and setter
  45.  
  46. public class CustomerPlan{
  47. public String customerName;
  48. public List<CustomerDetail> customerDetailsList;
  49.  
  50. //getter and setter
  51.  
  52. public class CustomerDetail {
  53.  
  54. @JsonProperty
  55. public String payment;
  56.  
  57. @JsonProperty
  58. public String limit;
Add Comment
Please, Sign In to add comment