pull/3/head
tanghc 4 years ago
parent 5aa11c734e
commit 9e905666c8
  1. 2
      sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/bean/SopConstants.java
  2. 2
      sop-common/sop-service-common/src/main/java/com/gitee/sop/servercommon/configuration/ServiceConfiguration.java
  3. 2
      sop-example/sop-springmvc/src/main/java/com/gitee/app/config/OpenServiceConfig.java

@ -54,6 +54,6 @@ public class SopConstants {
public static final String TARGET_SERVICE = "sop-target-service";
public static final String RESTFUL_REQUEST = "sop-restful-request";
public static final String METADATA_KEY_TIME_STARTUP = "time.startup";
public static final String METADATA_KEY_TIME_STARTUP = "server.startup-time";
}

@ -30,7 +30,7 @@ public class ServiceConfiguration extends SpringmvcConfiguration {
}
// 在元数据中新增启动时间,不能修改这个值,不然网关拉取接口会有问题
// 如果没有这个值,网关会忽略这个服务
metadata.put("time.startup", String.valueOf(System.currentTimeMillis()));
metadata.put("server.startup-time", String.valueOf(System.currentTimeMillis()));
return new NacosWatch(nacosDiscoveryProperties, taskScheduler);
}

@ -25,7 +25,7 @@ public class OpenServiceConfig extends SpringmvcConfiguration {
public static final String SERVER_CONTEXT_PATH = "server.servlet.context-path";
public static final String SERVER_IP = "server.ip";
public static final String SERVER_PORT = "server.port";
public static final String METADATA_TIME_STARTUP = "time.startup";
public static final String METADATA_TIME_STARTUP = "server.startup-time";
static {
ServiceConfig.getInstance().setDefaultVersion("1.0");

Loading…
Cancel
Save