提交 8910321b 编写于 作者: W wangfeihu

暴露监控端点以实现不重启手动刷新配置@RefreshScope

上级 538e9dcd
package com.afeiamic.springcloud.controller;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RefreshScope
public class ConfigClientController {
@Value("${config.info}")
......
......@@ -16,3 +16,10 @@ eureka:
client:
service-url:
defaultZone: http://eureka7001.com:7001/eureka,http://eureka7002.com:7002/eureka # 集群版
# 暴露监控端点
management:
endpoints:
web:
exposure:
include: "*"
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册