Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Afeiamic
SpringCloud
提交
8910321b
SpringCloud
项目概览
Afeiamic
/
SpringCloud
通知
3
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
分析
仓库
DevOps
项目成员
Pages
SpringCloud
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
Pages
分析
分析
仓库分析
DevOps
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
8910321b
编写于
1月 27, 2023
作者:
W
wangfeihu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
暴露监控端点以实现不重启手动刷新配置@RefreshScope
上级
538e9dcd
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
9 addition
and
0 deletion
+9
-0
cloud-config-client-3355/src/main/java/com/afeiamic/springcloud/controller/ConfigClientController.java
...eiamic/springcloud/controller/ConfigClientController.java
+2
-0
cloud-config-client-3355/src/main/resources/bootstrap.yml
cloud-config-client-3355/src/main/resources/bootstrap.yml
+7
-0
未找到文件。
cloud-config-client-3355/src/main/java/com/afeiamic/springcloud/controller/ConfigClientController.java
浏览文件 @
8910321b
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}"
)
...
...
cloud-config-client-3355/src/main/resources/bootstrap.yml
浏览文件 @
8910321b
...
...
@@ -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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录