当前位置:网站首页>Forest v1.5.22 release! Kotlin support
Forest v1.5.22 release! Kotlin support
2022-06-11 02:55:00 【Dromara open source organization】
Forest Introduce
Forest It's an open source Java HTTP Client Framework , It will be able to HTTP All request information for ( Include URL、Header as well as Body Etc ) Bind to your custom Interface On the way , Can be sent by calling local interface methods HTTP request
Forest How to use
Forest You don't need to write specific HTTP Call the process , You just need to define an interface , And then through Forest The annotation will HTTP The requested information can be added to the method of the interface . The request sender can automatically send the request and accept the response of the request by calling the interface you define
Forest How it works
Forest It will generate a concrete implementation class through the dynamic proxy of your defined interface , And then organize 、 verification HTTP Request information , Bind dynamic data , Convert data form ,SSL Verify the signature , Call back end HTTP API(httpclient etc. API) Execute the actual request , Waiting response , Failure to retry , Convert response data to Java The dirty work such as type is packaged by the implementation class of the dynamic agent . When requesting the sender to call this interface , It's actually calling this dirty implementation class
Winning awards
2021 year OSC China open source project selection 「 The most popular project 」
Related links : https://www.oschina.net/project/top_cn_2021
Key updates
Unified connection pool
No more separate definitions OkHttp and Httpclient Connection pool , There is no need to worry about the fact that asynchronous requests and synchronous requests are not in the same connection pool
This time, the unified connection pool is updated , Can pass max-connections and max-route-connections Unified attribute management OkHttp and HttpClient The maximum number of requests for all back-end requests and the maximum number of requests per route , At the same time, asynchronous requests can be restricted together
Parameter defines the return type
When an interface method returns a generic type of an unknown parameter , You can use the new @Return Parameter annotation , To identify a parameter as a return type
// adopt Class Type parameter to identify the return type @Get("/user/info") <T> T getGenericClass(@Return Class<T> clazz); // adopt Type Type parameter to identify the return type @Get("/user/info") <T> T getGenericType(@Return Type type); // adopt TypeReference Type parameter to identify the return type @Get("/user/info") <T> T getGenericTypeReference(@Return TypeReference<T> typeReference);Official website and warehouse address
Official website address :
Gitee Warehouse address :
https://gitee.com/dromara/forest
Github Warehouse address :
This update
New features
- feat: Unified connection pool (#I5APJA)
- feat: Configurable asynchronous request thread pool queue size (#I5B78X)
- feat: It supports defining return types through parameters (#I5ANZL)
Fix the problem
- fix: spring 5.1 The following lower versions failed to start
- fix: The request address contains # Characters will be escaped and the resource will not be found (#I59O7M)
- fix: To configure BaseRequest Of baseURL After attribute , The default port number in the full request path will be overwritten , Cause the request to fail (#I4YBDV)
- fix: Solve when @body After the annotation is identified on the object ,char&Character The attribute of type cannot be transferred from client to server
- fix: kotlin Project startup exception (#I50PDZ)
- fix: RetryWhen The retry condition interface will execute twice after the last retry (#I599BT)
Other changes
- update: #I5ANZR Delete... From the unit test code Log4j2 rely on
Thank you very much
The small partners participating in this update
- @xiao4852
This article belongs to dromara Owned by open source organizations (https://dromara.org/)
边栏推荐
- Navicat premium 15 tool is automatically deleted by anti-virus protection software solution
- Openjudge noi 1.13 17: text layout
- AOSP ~ 修改WebView默认实现
- AOSP ~ 修改默认音量
- Link list of high frequency written interview question brushing summary (distribution explanation & code annotation)
- AOSP ~ Logcat Chatty 行过期
- CPT 102_ LEC 17
- [AI weekly] AI and freeze electron microscopy reveal the structure of "atomic level" NPC; Tsinghua and Shangtang proposed the "SIM" method, which takes into account semantic alignment and spatial reso
- Rs232/rs485 to 4G DTU uploading temperature and humidity sensor data based on Modbus protocol to remote TCP server
- Blue Bridge Cup_ Xiao Lan eats candy_ Pigeon nest principle / drawer principle
猜你喜欢

How to fix syntax errors in WordPress websites

Can Xiaoxiang life become the "Yonghui" in the discount industry after the completion of the round a financing of tens of millions of yuan?

A collection of common ADB commands for app testing

GraphAcademy 课程讲解:《Neo4j 图数据科学基础》

Wechat applet

Common vocabulary of software testing English

ADVANCE. AI CEO Shoudong will share the compliance of cross-border e-commerce using AI technology at the 2022 emerging market brands online Summit

你的公司会选择开发数据中台吗?

蓝桥杯_小蓝吃糖果_鸽巢原理 / 抽屉原理

Manon's advanced road - Daily anecdotes
随机推荐
Jetpack compose box control
Cmake common commands
巴歇尔槽流量计远程采集物联网关在明渠流量监测的应用
[MySQL 45 lecture -12] lecture 12 the reason why MySQL has a wind attack from time to time
Flat data to tree and tree data flattening
Tests logiciels vocabulaire commun anglais
Databinding escaping with presentation symbols
两部门联合印发《校外培训机构消防安全管理九项规定》
Can Xiaoxiang life become the "Yonghui" in the discount industry after the completion of the round a financing of tens of millions of yuan?
Flink开发环境搭建及WordCount
Baidu submits sitemap to prompt the solution of "index type is not handled"
A digit DP
CPT 102_LEC 18
JS memory leak
【长时间序列预测】Aotoformer 代码详解之[3]模型整体架构分析
WordPress upgrade error: briefly unavailable for scheduled maintenance [resolved]
List 过滤、排序、校验等处理方法
Rs232/rs485 to 4G DTU uploading temperature and humidity sensor data based on Modbus protocol to remote TCP server
[implementation of bubble sorting]
CPT 102_ LEC 18