代码库从gitlab迁移到云效之后,webhook失效了,仔细检查发现,spring-cloud-config-monitor 只支持、github、gitlab、bitbucket、gitea、gitee、gogs还不支持云效,只好自己参照一下源码注册一个云效的bean,结果发现还是无效,仔细对比了一下gitlab和云效的webhook body,发现云效commits字段没有added、removed、modified属性,只好调整一下path,webhook的时间从几十ms变成了3000多ms,不知还有没有其他方法改进
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.cloud.config.monitor.EnvironmentMonitorAutoConfiguration;
import org.springframework.cloud.config.monitor.FileMonitorConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
@Configuration(proxyBeanMethods = false)
@ConditionalOnWebApplication
@Import(FileMonitorConfiguration.class)
public