|
@@ -155,7 +155,7 @@ public class AppBootstrap {
|
|
|
Response resp = null;
|
|
|
try {
|
|
|
Map<String, String> headers = Maps.newHashMap();
|
|
|
- headers.put("TRACE_ID", startupCode);
|
|
|
+ headers.put("Trace-Id", startupCode);
|
|
|
resp = OKHttpUtil.call(HttpMethod.POST, url.toString(), headers, req);
|
|
|
} catch (Exception e) {
|
|
|
log.error("fail to notice config center.", e);
|
|
@@ -182,7 +182,7 @@ public class AppBootstrap {
|
|
|
Response resp = null;
|
|
|
try {
|
|
|
Map<String, String> headers = Maps.newHashMap();
|
|
|
- headers.put("TRACE_ID", startupCode);
|
|
|
+ headers.put("Trace-Id", startupCode);
|
|
|
resp = OKHttpUtil.call(HttpMethod.POST, url.toString(), headers, req);
|
|
|
if (resp.code() != HttpStatus.OK.value()) {
|
|
|
throw new ExamCloudRuntimeException("fail to get configuration");
|
|
@@ -226,13 +226,13 @@ public class AppBootstrap {
|
|
|
s = s.trim();
|
|
|
if (s.startsWith("--spring.profiles.active=")) {
|
|
|
active = s.substring(s.indexOf("=") + 1);
|
|
|
- } else if (s.startsWith("--ocean.startup.startupCode=")) {
|
|
|
+ } else if (s.startsWith("--examcloud.startup.startupCode=")) {
|
|
|
startupCode = s.substring(s.indexOf("=") + 1);
|
|
|
- } else if (s.startsWith("--ocean.startup.configCenterHost=")) {
|
|
|
+ } else if (s.startsWith("--examcloud.startup.configCenterHost=")) {
|
|
|
configCenterHost = s.substring(s.indexOf("=") + 1);
|
|
|
- } else if (s.startsWith("--ocean.startup.configCenterPort=")) {
|
|
|
+ } else if (s.startsWith("--examcloud.startup.configCenterPort=")) {
|
|
|
configCenterPort = s.substring(s.indexOf("=") + 1);
|
|
|
- } else if (s.startsWith("--ocean.startup.appCode=")) {
|
|
|
+ } else if (s.startsWith("--examcloud.startup.appCode=")) {
|
|
|
appCode = s.substring(s.indexOf("=") + 1);
|
|
|
}
|
|
|
}
|
|
@@ -253,53 +253,53 @@ public class AppBootstrap {
|
|
|
|
|
|
// startupCode
|
|
|
if (null == startupCode) {
|
|
|
- String value = props.getProperty("ocean.startup.startupCode");
|
|
|
+ String value = props.getProperty("examcloud.startup.startupCode");
|
|
|
if (StringUtils.isNotBlank(value)) {
|
|
|
startupCode = value.trim();
|
|
|
}
|
|
|
}
|
|
|
log.info("startupCode=" + startupCode);
|
|
|
if (StringUtils.isBlank(startupCode)) {
|
|
|
- log.error("property[ocean.startup.startupCode] is not specified");
|
|
|
+ log.error("property[examcloud.startup.startupCode] is not specified");
|
|
|
System.exit(-1);
|
|
|
}
|
|
|
|
|
|
// appCode
|
|
|
if (null == appCode) {
|
|
|
- String value = props.getProperty("ocean.startup.appCode");
|
|
|
+ String value = props.getProperty("examcloud.startup.appCode");
|
|
|
if (StringUtils.isNotBlank(value)) {
|
|
|
appCode = value.trim();
|
|
|
}
|
|
|
}
|
|
|
log.info("appCode=" + appCode);
|
|
|
if (StringUtils.isBlank(appCode)) {
|
|
|
- log.error("property[ocean.startup.appCode] is not specified");
|
|
|
+ log.error("property[examcloud.startup.appCode] is not specified");
|
|
|
System.exit(-1);
|
|
|
}
|
|
|
|
|
|
// configCenterHost
|
|
|
if (null == configCenterHost) {
|
|
|
- String value = props.getProperty("ocean.startup.configCenterHost");
|
|
|
+ String value = props.getProperty("examcloud.startup.configCenterHost");
|
|
|
if (StringUtils.isNotBlank(value)) {
|
|
|
configCenterHost = value.trim();
|
|
|
}
|
|
|
}
|
|
|
log.info("configCenterHost=" + configCenterHost);
|
|
|
if (StringUtils.isBlank(configCenterHost)) {
|
|
|
- log.error("property[ocean.startup.configCenterHost] is not specified");
|
|
|
+ log.error("property[examcloud.startup.configCenterHost] is not specified");
|
|
|
System.exit(-1);
|
|
|
}
|
|
|
|
|
|
// configCenterPort
|
|
|
if (null == configCenterPort) {
|
|
|
- String value = props.getProperty("ocean.startup.configCenterPort");
|
|
|
+ String value = props.getProperty("examcloud.startup.configCenterPort");
|
|
|
if (StringUtils.isNotBlank(value)) {
|
|
|
configCenterPort = value.trim();
|
|
|
}
|
|
|
}
|
|
|
log.info("configCenterPort=" + configCenterPort);
|
|
|
if (null == configCenterPort) {
|
|
|
- log.error("property[ocean.startup.configCenterPort] is not specified");
|
|
|
+ log.error("property[examcloud.startup.configCenterPort] is not specified");
|
|
|
System.exit(-1);
|
|
|
}
|
|
|
|