GitHub和码云的webhooks动态刷新配置时,解析传过去的json失败导致动态刷新配置失败
解决方案:
在config-server里面自定义一个webhooks链接,完美解决
@PostMapping("/monitor")
public String monitor(){
ServiceInstance user = balancerClient.choose("config-server");
String url = String.format("http://%s:%s/%s", user.getHost(), user.getPort(), "actuator/bus-refresh");
return HttpClientUtil.doPost(url);
}