1.发现问题
最近学习spring cloud,想要配合github提供的webhook功能实现线上刷新的功能(听上去很酷炫有没有)。踩了一通spring boot2.0的坑之后(主要就是2.0之后改变了配置刷新接口),总算可以通过手动发送/actuator/bus-refresh请求来实现配置的动态刷新,然而新的问题又来了,集成webhook后(需要进行内网穿透,推荐使用natapp),GitHub在进行post请求的同时默认会在body加上这么一串载荷(payload)
{
"ref": "refs/heads/master",
"before": "c34de85d9488373f09b0d7a32c03c1cc43039bfa",
"after": "7f31e5860beb93f81376bd788c46906211b0b394",
"created": false,
"deleted": false,
"forced": false,
"base_ref": null,
"compare": "https://github.com/Tinysakura/practice-config-repo/compare/c34de85d9488...7f31e5860beb",
"commits": [
{
"id": "7f31e5860beb93f81376bd788c46906211b0b394",
"tree_id": "b68b8ce368c12580bd852d8ed2eed7cbf6770075",
"distinct": true,
"message": "Update order-dev.yml",
"timestamp": "2018-09-22T11:26:29+08:00",
"url": "https://github.com/Tinysakura/practice-config-repo/commit/7f31e5860beb93f81376bd788c46906211b0b394",
"author": {
"name": "陈飞豪",
"email": "2796191719@qq.com",
"username": "Tinysakura"
},
"committer": {
"name": "GitHub",
"email": "noreply@github.com",
"username": "web-flow"
},
"added": [
],
"removed": [
],
"modified": [
"order/order-dev.yml"
]
}
],
"head_commit": {
"id": "7f31e5860beb93f81376bd788c46906211b0b394",
"tree_id": "b68b8ce368c12580bd852d8ed2eed7cbf6770075",
"distinct": true,
"message": "Update order-dev.yml",
"timestamp": "2018-09-22T11:26:29+08:00",
"url": "https://github.com/Tinysakura/practice-config-repo/commit/7f31e5860beb93f81376bd788c46906211b0b394",
"author": {
"name": "陈飞豪",
"email": "2796191719@qq.com",
"username": "Tinysakura"
},
"committer": {
"name": "GitHub",
"email": "noreply@github.com",
"username": "web-flow"
},
"added": [
],
"removed": [
],
"modified": [
"order/order-dev.yml"
]
},
"repository": {
"id": 149753569,
"node_id": "MDEwOlJlcG9zaXRvcnkxNDk3NTM1Njk=",
"name": "practice-config-repo",
"full_name": "Tinysakura/practice-config-repo",
"private": false,
"owner": {
"name": &#