当前位置:网站首页>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/)
边栏推荐
- 富络经典源码富络经典系统开发原理分享
- How to add cookie pop-up window in WordPress website (without plug-in)
- If you understand the logic of mining and carbon neutrality, you will understand the 100 billion market of driverless mining areas
- 【大咖秀】博睿数据眼中的AIOps,选择正确的赛道正确的人
- Necessity for banks to choose electronic bidding procurement
- How to state clearly and concisely the product requirements?
- 学习太极创客 — ESP8226 (二)
- The Google search console webmaster tool cannot read the sitemap?
- GCC C inline assembly
- Sd3.0 notes
猜你喜欢
随机推荐
逃离大城市的年轻人:扛住了房价和压力,没扛住流行病
How to use phpMyAdmin to optimize MySQL database
Fundamentals of deep learning [4] build easyocr and carry out simple character recognition from 0
[long time series prediction] aotoformer code detailed [3] model overall architecture analysis
Location data fusion Table 3
jdbc工具类的问题
完成千万元A轮融资,小象生活能否成为折扣界的“永辉”?
Go 语言的优势和学习路线图
OpenJudge NOI 1.13 17:文字排版
OpenJudge NOI 1.13 18:Tomorrow never knows?
MySQL is required to sort in ascending order greater than or equal to the current time, and then in descending order less than the current time
Determine whether a string of numbers is the result of a quick sort
CPT 102_ LEC 17
[189. rotation array]
Istio installation and use
AOSP ~ 修改默认音量
How to state clearly and concisely the product requirements?
helm 部署traefik ingress
Graphacademy course explanation: Fundamentals of neo4j graph data science
CPT 102_ LEC 15









