In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Today, I would like to share with you the introduction of spring-cloud-starter-openfeign rear classification can not find how to solve the relevant knowledge, detailed content, clear logic, I believe that most people still know too much about this knowledge, so share this article for your reference, I hope you can get something after reading this article, let's take a look at it.
Introduction of spring-cloud-starter-openfeign rear classification could not be found
I had a strange problem today.
Spring-cloud-starter-openfeign dependencies have been introduced in pom.
Org.springframework.cloud spring-cloud-starter-openfeign
However, the code indicates that the FeignClient class cannot be found.
Reason
I used the aliyuMaven warehouse and found that spring-cloud-starter-openfeign is different from the official spring warehouse.
Solution
Delete the jar package of the local warehouse, delete the aliyun private server and the company's private server first in the setting.xml file [because most companies use aliyun proxy.] plus spring private server. Of course, if the location of the private server is set in the overall pom file of your project, the same reason needs to be changed.
Then, update the maven dependency, download it, and then restore the setting file.
Spring-cloud-starter-openfeign performance optimized configuration of HttpClient or OKHttp
By default, when spring cloud feign makes calls between child services, the http component uses jdk's HttpURLConnection and does not use thread pools. There are two optional thread pools: HttpClient and OKHttp
Io.github.openfeign feign-httpclient 11.0
Or
Io.github.openfeign feign-okhttp 11.0configuration parameter feign: httpclient: enabled: true # feign maximum number of connections max-connections: 200 # feign maximum number of connections per path max-connections-per-route: 50
Or
Feign: okhttp: enabled: true # feign maximum number of connections max-connections: 200 # feign maximum number of connections per path max-connections-per-route: 50 log level
In a production environment, you need to print a log of feign, use the basic level to ok, and full is not recommended. Printing too many logs consumes the performance of feign.
Feign: client: config: default: loggerLevel: basic
The log level of the parent test is changed from full to basic. When the concurrency is high, the interface QPS increases by 30% +.
These are all the contents of the article "I can't find a solution by introducing the rear classification of spring-cloud-starter-openfeign". Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.