commit | ddc6c5e695f8fea952073e02dc099466ffc095f2 | [log] [tgz] |
---|---|---|
author | qixiaobo <qixiaobo.nj@gmail.com> | Thu Aug 01 14:54:37 2019 +0800 |
committer | qixiaobo <qixiaobo.nj@gmail.com> | Thu Aug 01 14:54:37 2019 +0800 |
tree | a8dae976d2feb9dd668a3a2de18d9b7cc5901f9e | |
parent | c4834856e312fe1086532ffe7e91d17e94cb6d74 [diff] |
change getRawParameter to getParameter because group never appears in special meta information ```java public String getRawParameter(String key) { if ("protocol".equals(key)) return protocol; if ("username".equals(key)) return username; if ("password".equals(key)) return password; if ("host".equals(key)) return host; if ("port".equals(key)) return String.valueOf(port); if ("path".equals(key)) return path; return getParameter(key); } ```
Dubbo Proxy, a gateway of Dubbo, switch from HTTP request to Dubbo protocol,then invoke Dubbo service and return to the result. Later Dubbo Proxy would combine several features, including circuit breaker, current-limiting, api management.
HTTP request format:
{application Name}/{Interface name}?version={version}&group={group}
Group and version is the mapping data in Dubbo service.
http POST body:
{ "methodName" : "sayHello", "paramTypes" : ["org.apache.dubbo.demo.model.User"], "paramValues": [ { "id": 23, "username": "testUser" } ] }
application.yml
proxy.registry.address: zookeeper://127.0.0.1:2181 #registry center address, same as Dubbo service's proxy.metadata-report.address: zookeeper://127.0.0.1:2181 #metadata center address, used by paramType search, support for dubbo 2.7 or later