Skip to content

Commit

Permalink
Merge branch 'master' into add-h2-quick-start-doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Anilople authored Jul 25, 2023
2 parents 1821edd + d6bf360 commit 538e8da
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 27 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ Apollo 2.2.0
* [feat: check port use by another process or not when startup](https://github.com/apolloconfig/apollo/pull/4656)
* [Bump springboot version from 2.7.9 to 2.7.11](https://github.com/apolloconfig/apollo/pull/4828)
* [[Multi-Database Support][h2] Support run on h2](https://github.com/apolloconfig/apollo/pull/4851)
* [Fix the issue that env special case handling is missing in some case](https://github.com/apolloconfig/apollo/pull/4887)
* [Fix the issue that namespace content being cleared when identical content is pasted into the namespace](https://github.com/apolloconfig/apollo/pull/4922)

------------------
All issues and pull requests are [here](https://github.com/apolloconfig/apollo/milestone/13?closed=1)
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ public class Env {
com.ctrip.framework.apollo.core.enums.Env.LOCAL.name());
public static final Env DEV = addEnvironment(
com.ctrip.framework.apollo.core.enums.Env.DEV.name());
public static final Env FWS = addEnvironment(
com.ctrip.framework.apollo.core.enums.Env.FWS.name());
public static final Env FAT = addEnvironment(
com.ctrip.framework.apollo.core.enums.Env.FAT.name());
public static final Env FWS = addEnvironment(
com.ctrip.framework.apollo.core.enums.Env.FWS.name());
public static final Env UAT = addEnvironment(
com.ctrip.framework.apollo.core.enums.Env.UAT.name());
public static final Env LPT = addEnvironment(
Expand Down Expand Up @@ -77,7 +77,20 @@ private static String getWellFormName(String envName) {
if (StringUtils.isBlank(envName)) {
return "";
}
return envName.trim().toUpperCase();

String envWellFormName = envName.trim().toUpperCase();

// special case for production in case of typo
if ("PROD".equals(envWellFormName)) {
return Env.PRO.name;
}

// special case that FAT & FWS should map to FAT
if ("FWS".equals(envWellFormName)) {
return Env.FAT.name;
}

return envWellFormName;
}

/**
Expand All @@ -88,15 +101,6 @@ private static String getWellFormName(String envName) {
*/
public static Env transformEnv(String envName) {
final String envWellFormName = getWellFormName(envName);
// special case for production in case of typo
if ("PROD".equalsIgnoreCase(envWellFormName)) {
return Env.PRO;
}

// special case that FAT & FWS should map to FAT
if ("FWS".equalsIgnoreCase(envWellFormName)) {
return Env.FAT;
}

if (Env.exists(envWellFormName)) {
return Env.valueOf(envWellFormName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -989,16 +989,8 @@ function directive($window, $translate, toastr, AppUtil, EventManager, Permissio
})
},
onChange: function (e) {
if ((e[0].action === 'insert') && (scope.namespace.hasOwnProperty("editText")) && (scope.namespace.editText.length === 0)) {
let text = ''
for (let i = 0; i < e[0].lines.length; i++) {
if (i === 0) {
text = e[0].lines[0]
} else {
text += '\r\n' + e[0].lines[i]
}
}
scope.namespace.editText = text
if ((e[0].action === 'insert') && (scope.namespace.hasOwnProperty("editText"))) {
scope.namespace.editText = e[1].session.getValue();
}

}
Expand Down
1 change: 1 addition & 0 deletions docs/en/community/team.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Members include Project Management Committee members and committers. The list is
| nisiyong | Stephen Ni | Qihoo 360 |
| nobodyiam | Jason Song | Ant Group |
| pengweiqhca | Wei Peng | Tuhu |
| Shoothzj | ZhangJian He | Huawei |
| vdisk-group | Lvqiu Ye | Hundsun |
| zouyx | Joe Zou | Shein |

Expand Down
2 changes: 1 addition & 1 deletion docs/en/deployment/deployment-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ flowchart LR
jvm8070 --> jvm8090
```

Later, in order to flowchart more concise, the content in JVM8080 will be simplified, only the Config Service will be displayed, and the Meta Server and Config Service inside will no longer be displayed
Later, in order to flowchart more concise, the content in JVM8080 will be simplified, only the Config Service will be displayed, and the Meta Server and Eureka inside will no longer be displayed

```mermaid
flowchart LR
Expand Down
2 changes: 1 addition & 1 deletion docs/en/usage/other-language-client-user-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ Header information to be set.

| Header | Value | Remarks |
| ------------- | ------------------------------------------------------------ | ------------------------------------------------------------ |
| Authorization | Apollo ${appId}:${signature} | appId: the appId of the application, signature: the current time and the URL visited using the access key after the value of the signature, the specific implementation can be found in [Signature.signature](https://github.com/apolloconfig/apollo/blob/aa184a2e11d6e7e3f519d860d69f3cf30ccfcf9c/apollo-core/src/main/java/com/ctrip/framework/apollo/core/signature/Signature.java#L22) |
| Authorization | Apollo ${appId}:${signature} | appId: The appId of the application, signature: Generate a signature by combining the access key with the current timestamp in milliseconds, as well as the path and query components of the visited URL. The specific implementation can be found in [Signature.signature](https://github.com/apolloconfig/apollo/blob/aa184a2e11d6e7e3f519d860d69f3cf30ccfcf9c/apollo-core/src/main/java/com/ctrip/framework/apollo/core/signature/Signature.java#L22) |
| Timestamp | Number of milliseconds elapsed from `1970-1-1 00:00:00 UTC+0` to now | See [System.currentTimeMillis](https://docs.oracle.com/javase/7/docs/api/java/lang/System.html#currentTimeMillis()) |

## 1.6 Error Code Description
Expand Down
20 changes: 20 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,26 @@

</body>

<!-- add qa bot -->
<script>
(function() {
var link = document.createElement('link');
link.rel = 'stylesheet';
link.href = 'https://ai.apolloconfig.com/qa-bot.css';
document.head.appendChild(link);

var script = document.createElement('script');
script.src = 'https://ai.apolloconfig.com/qa-bot.js';
script.onload = function () {
QABot.initialize({
"serverUrl": "https://ai.apolloconfig.com/qa",
"documentSiteUrlPrefix": "https://www.apolloconfig.com/#"
});
};
document.body.appendChild(script);
})();
</script>

<!-- mermaid -->
<script src="//unpkg.com/[email protected]/dist/mermaid.min.js"></script>
<script>
Expand Down
1 change: 1 addition & 0 deletions docs/zh/community/team.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Member 包括 PMC 成员和 Committer,该列表按字母顺序排列。
| nisiyong | Stephen Ni | Qihoo 360 |
| nobodyiam | Jason Song | Ant Group |
| pengweiqhca | Wei Peng | Tuhu |
| Shoothzj | ZhangJian He | Huawei |
| vdisk-group | Lvqiu Ye | Hundsun |
| zouyx | Joe Zou | Shein |

Expand Down
2 changes: 1 addition & 1 deletion docs/zh/deployment/deployment-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ flowchart LR
JVM8070 --> JVM8090
```

后续为了flowchart更简洁,将JVM8080里的内容进行简化,只显示Config Service,里面的Meta Server和Config Service不再显示
后续为了flowchart更简洁,将JVM8080里的内容进行简化,只显示Config Service,里面的Meta Server和Eureka不再显示

```mermaid
flowchart LR
Expand Down
4 changes: 2 additions & 2 deletions docs/zh/usage/other-language-client-user-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ Apollo从1.6.0版本开始增加访问密钥机制,从而只有经过身份验

| Header | Value | 备注 |
|---------------|------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Authorization | Apollo ${appId}:${signature} | appId: 应用的appId,signature:使用访问密钥对当前时间以及所访问的URL加签后的值,具体实现可以参考[Signature.signature](https://github.com/apolloconfig/apollo/blob/aa184a2e11d6e7e3f519d860d69f3cf30ccfcf9c/apollo-core/src/main/java/com/ctrip/framework/apollo/core/signature/Signature.java#L22) |
| Authorization | Apollo ${appId}:${signature} | appId: 应用的appId,signature:使用访问密钥对当前时间毫秒值以及所访问的URL里的的path和query部分加签后的值,具体实现可以参考[Signature.signature](https://github.com/apolloconfig/apollo/blob/aa184a2e11d6e7e3f519d860d69f3cf30ccfcf9c/apollo-core/src/main/java/com/ctrip/framework/apollo/core/signature/Signature.java#L22) |
| Timestamp |`1970-1-1 00:00:00 UTC+0`到现在所经过的毫秒数 | 可以参考[System.currentTimeMillis](https://docs.oracle.com/javase/7/docs/api/java/lang/System.html#currentTimeMillis()) |

## 1.6 错误码说明
Expand All @@ -181,4 +181,4 @@ Apollo从1.6.0版本开始增加访问密钥机制,从而只有经过身份验
接口访问的Method不正确,比如应该使用GET的接口使用了POST访问等,客户端需要检查接口访问方式是否正确。

### 1.6.5 500 - Internal Server Error
其它类型的错误默认都会返回500,对这类错误如果应用无法根据提示信息找到原因的话,可以尝试查看服务端日志来排查问题。
其它类型的错误默认都会返回500,对这类错误如果应用无法根据提示信息找到原因的话,可以尝试查看服务端日志来排查问题。

0 comments on commit 538e8da

Please sign in to comment.