webhooks动态更新配置

config server 项目中加入 monitor依赖 

 

        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-config-monitor</artifactId>
        </dependency>

 

github  项目管理中 设置webhooks 

  

 

  必须是外网能访问 的 地址  ,可以使用内网穿透软件实现 

    http://xxx.xxx/monitor   

    当提交项目时 github 会发送一个post请求给monitor 接口  ,通过消息队列 实现配置更新

    

 

posted @ 2019-09-25 11:03  MartinEDM  阅读(362)  评论(0编辑  收藏  举报