Browse Source

update doc

张泳健 5 years ago
parent
commit
3b0df306b0
1 changed files with 6 additions and 1 deletions
  1. 6 1
      configuration-loader/README.md

+ 6 - 1
configuration-loader/README.md View File

64
     @Data
64
     @Data
65
     public static class Transfer {
65
     public static class Transfer {
66
         private List<String> urls;
66
         private List<String> urls;
67
+        @JsonProperty("test-info")
68
+        private String testInfo;
67
     }
69
     }
68
 
70
 
69
     @Data
71
     @Data
89
 transfer:
91
 transfer:
90
   # all transfer services url
92
   # all transfer services url
91
   urls: [127.0.0.1:9082]
93
   urls: [127.0.0.1:9082]
94
+  test-info: test-info-content
92
 redis:
95
 redis:
93
   host: ${connector.port}
96
   host: ${connector.port}
94
   port: 6379
97
   port: 6379
109
 ConnectorProperties connectorProperties = ConfigLoader.parseConfig(args, ConnectorProperties.class, profile -> {
112
 ConnectorProperties connectorProperties = ConfigLoader.parseConfig(args, ConnectorProperties.class, profile -> {
110
     LogSetter.setLogback("logback", profile);
113
     LogSetter.setLogback("logback", profile);
111
 });
114
 });
115
+```
112
 
116
 
113
-```
117
+**字段和属性名不一致时:**
118
+使用`@JsonProperty("原属性名")` 修饰字段