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

Fix acm-local-example

Make the example app automatically refresh value from acm config server
by adding `@RefreshScope` annotation.
This commit is contained in:
Rivers-Shall 2019-07-23 16:25:54 +08:00
parent 0f92340ac0
commit bbc06485db

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,6 +27,7 @@ import org.springframework.web.bind.annotation.RestController;
* @author xiaolongzuo
*/
@RestController
@RefreshScope
public class EchoController {
private static final Logger LOGGER = LoggerFactory.getLogger(EchoController.class);