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