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