云之家API获取数据,Unirest.post 关闭Closing connections idle longer than 30 SECONDS
来源:互联网 发布:读写数据什么意思 编辑:程序博客网 时间:2024/06/17 14:30
项目获取云之家的数据,写的demo在main方法里面执行没有问题,集成到自己公司的项目中,使用的是SSM框架,每当去获取数据的时候控制台一直跳:
14:05:25,954 INFO [STDOUT] [PoolingHttpClientConnectionManager] : Closing expired connections 14:05:25,954 INFO [STDOUT] [PoolingHttpClientConnectionManager] : Closing connections idle longer than 30 SECONDS
虽然对于我获取数据没影响,但是保不准后期不会存在其他风险,还是尝试关闭好。并且一直反复的弹送看着烦。获取云之家数据的请求代码(部分,需要全部的自己去找):
//获取个人信息 保密的为公司对应的key文件密钥
HttpResponse<JsonNode> jsonResponsePerson = Unirest
.post(person_getall_url)
.header("Content-Type", "application/x-www-form-urlencoded")
.field("eid", "保密")
.field("nonce", UUID.randomUUID().toString())
.field("data",EncryptUtils.encryptWithEncodeBase64UTF8(jsonData.toString(), key)).asJson();
关闭方法:
1. Unirest.shutdown() ;
如果使用这种我发现,它真的就停止了,也就是说我不重启tomcat,再次去访问的时候它取不到数据,那肯定不符合我的要求
2. 在 log4j.xml 里面配置如下一段代码。(上面的英文是解释)
You may use com.mashape.unirest.http.options.Options.refresh();
to enable Unirest again or just modify log4j to change the log level of org.apache.http.impl.conn.PoolingHttpClientConnectionManager from DEBUG.
<logger name="org.apache.http.impl.conn.PoolingHttpClientConnectionManager"> <level value="WARN"/> <appender-ref ref="MyLogFile"/></logger>
- 云之家API获取数据,Unirest.post 关闭Closing connections idle longer than 30 SECONDS
- [SQL SERVER] I/O requests taking longer than 15 seconds to complete on file
- [Python] openpyxl读存大数据 Exception: String longer than 32767 characters
- 缓解 SQL Server has encountered 727 occurrence(s) of I/O requests taking longer than 15 seconds
- GPF之获取GET,POST数据
- Delete log files longer than 45 days
- Find another way longer than A-C
- 获取POST数据
- 获取post数据
- nodejs 获取post数据
- C# 获取POST数据
- flask获取post数据
- post数据获取
- blocked for more than 120 seconds 错误
- iOS开发之Xcode9报错 Compiling IB documents for earlier than iOS7 is no longer supported.
- IOS开发之Post 方式获取服务器数据
- VB调用API post数据
- 在Closing事件里阻止窗口关闭
- 正则简介
- ubootenv工具fw_printenv及配置文件fw_env.config
- Vi/Vim查找替换使用方法
- WSAEventSelect事件模型函数介绍
- 集合
- 云之家API获取数据,Unirest.post 关闭Closing connections idle longer than 30 SECONDS
- ==和equals 讲解
- 继承那些事儿
- POJ3481 SBT模板题目
- Thinkphp5之上传文件命名重复
- 创建链表
- ubuntu 16.04 解决数字为菱形◇◇◇◇◇◇的问题
- ESP-TCP (2/34) --- ESP-IDF 下基于 JSON 格式进行 TCP 数据交互
- 在gazebo中启动移动机器人模型,并实现横向移动