-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
client url字符串问题,route redis配置更新 #134
Conversation
client url字符串多 / ,route redis配置更新
在运行server和route的时候发现会报log4j的错,虽不影响运行但尝试解决,是zkclient下的log4j未配置原因,于是在commen中添加配置文件
@@ -13,7 +13,7 @@ cim.msg.logger.path = /opt/logs/cim/ | |||
|
|||
|
|||
# route url suggested that this is Nginx address | |||
cim.route.url = http://localhost:8083/ | |||
cim.route.url = http://localhost:8083 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better to adress the campatibility issue here:
cim/cim-common/src/main/java/com/crossoverjie/cim/common/core/proxy/ProxyManager.java
Lines 58 to 62 in 1e993d7
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { | |
JSONObject jsonObject = new JSONObject(); | |
String serverUrl = url + "/" + method.getName() ; | |
if (args != null && args.length > 1) { |
e.g:
String serverUrl = url + "/" + method.getName() ;
URI uri = new URI(serverUrl);
String fixedUrl = uri.normalize().toString();
...
return HttpClient.call(okHttpClient, jsonObject.toString(), fixedUrl);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好的杰哥,已经改了
使用uri.normalize校验url规范性,更健壮。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
client url字符串多 / ,route redis配置更新