Skip to content

Commit 685ce9c

Browse files
authored
Merge pull request #93 from sunxia0/master
resolve #91
2 parents 6c42a53 + 855c715 commit 685ce9c

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

mse-simple-demo/A/src/main/java/com/alibabacloud/mse/demo/AController.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import org.apache.http.impl.client.HttpClientBuilder;
1313
import org.apache.http.util.EntityUtils;
1414
import org.springframework.beans.factory.annotation.Autowired;
15+
import org.springframework.beans.factory.annotation.Value;
1516
import org.springframework.cloud.commons.util.InetUtils;
1617
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
1718
import org.springframework.web.bind.annotation.GetMapping;
@@ -43,6 +44,9 @@ class AController {
4344
@Autowired
4445
ThreadPoolTaskExecutor taskExecutor;
4546

47+
@Value("${custom.config.value}")
48+
private String configValue;
49+
4650
private String currentZone;
4751

4852
@PostConstruct
@@ -82,7 +86,7 @@ public String a(HttpServletRequest request) throws ExecutionException, Interrupt
8286
// restTemplate.getForObject("http://sc-B/b", String.class)
8387
// ).get();
8488

85-
return "A" + servcieTag + "[" + inetUtils.findFirstNonLoopbackAddress().getHostAddress() + "]" + " -> " +
89+
return "A" + servcieTag + "[" + inetUtils.findFirstNonLoopbackAddress().getHostAddress() + "]" + "[config=" + configValue + "]" + " -> " +
8690
result;
8791
}
8892

mse-simple-demo/A/src/main/resources/application.properties

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,6 @@ dubbo.registry.check=false
2121

2222
rocketmq.consumer.topic=TEST_MQ
2323
rocketmq.consumer.group=test-a
24-
middleware.mq.address=mqnamesrv:9876
24+
middleware.mq.address=mqnamesrv:9876
25+
26+
custom.config.value=base

0 commit comments

Comments
 (0)