1
0
mirror of https://gitee.com/mirrors/Spring-Cloud-Alibaba.git synced 2021-06-26 13:25:11 +08:00

Update SchedulerX endpoint.

This commit is contained in:
xiaolongzuo 2018-12-14 14:08:22 +08:00
parent 37afaa48ae
commit 4ae39c9ae2

View File

@ -20,6 +20,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.actuate.endpoint.annotation.Endpoint;
import org.springframework.boot.actuate.endpoint.annotation.ReadOperation;
import org.springframework.cloud.alicloud.context.edas.EdasProperties;
import org.springframework.cloud.alicloud.context.scx.ScxProperties;
import java.util.HashMap;
@ -35,7 +36,10 @@ public class ScxEndpoint {
private ScxProperties scxProperties;
public ScxEndpoint(ScxProperties scxProperties) {
private EdasProperties edasProperties;
public ScxEndpoint(EdasProperties edasProperties, ScxProperties scxProperties) {
this.edasProperties = edasProperties;
this.scxProperties = scxProperties;
}
@ -46,6 +50,7 @@ public class ScxEndpoint {
public Map<String, Object> invoke() {
Map<String, Object> scxEndpoint = new HashMap<>();
LOGGER.info("SCX endpoint invoke, scxProperties is {}", scxProperties);
scxEndpoint.put("namespace", edasProperties == null ? "" : edasProperties.getNamespace());
scxEndpoint.put("scxProperties", scxProperties);
return scxEndpoint;
}