1
0
mirror of https://gitee.com/mirrors/Spring-Cloud-Alibaba.git synced 2021-06-26 13:25:11 +08:00

Merge code from upstream

This commit is contained in:
ly
2019-07-23 21:34:04 +08:00
parent 5cf28cb7a6
commit af09456b7d
587 changed files with 443 additions and 40842 deletions

View File

@@ -14,12 +14,16 @@
<dependencies>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>alicloud-acm-spring-cloud-starter</artifactId>
<artifactId>spring-cloud-starter-alicloud-acm</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
</dependencies>
<build>

View File

@@ -27,8 +27,8 @@ import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
@EnableDiscoveryClient
public class AcmApplication {
public static void main(String[] args) {
SpringApplication.run(AcmApplication.class, args);
}
public static void main(String[] args) {
SpringApplication.run(AcmApplication.class, args);
}
}

View File

@@ -19,6 +19,7 @@ package com.alibaba.cloud.examples;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@@ -26,16 +27,17 @@ import org.springframework.web.bind.annotation.RestController;
* @author xiaolongzuo
*/
@RestController
@RefreshScope
public class EchoController {
private static final Logger LOGGER = LoggerFactory.getLogger(EchoController.class);
private static final Logger LOGGER = LoggerFactory.getLogger(EchoController.class);
@Value("${user.id}")
private String userId;
@Value("${user.id}")
private String userId;
@RequestMapping(value = "/")
public String echo() {
LOGGER.info("User id is " + userId);
return userId;
}
@RequestMapping(value = "/")
public String echo() {
LOGGER.info("User id is " + userId);
return userId;
}
}

View File

@@ -1,4 +1,5 @@
spring.application.name=acm-local
server.port=18089
spring.cloud.alicloud.acm.server-list=127.0.0.1
spring.cloud.alicloud.acm.server-port=8080
spring.cloud.alicloud.acm.server-port=8080
management.endpoints.web.exposure.include=*