-
-
Notifications
You must be signed in to change notification settings - Fork 9.1k
恢复默认 HTTP 客户端兼容性 #4067
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
base: develop
Are you sure you want to change the base?
恢复默认 HTTP 客户端兼容性 #4067
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,7 +8,7 @@ | |
| * @author <a href="https://github.com/lixize">Zeyes</a> | ||
| */ | ||
| @Slf4j | ||
| public class WxChannelServiceImpl extends WxChannelServiceHttpComponentsImpl { | ||
| public class WxChannelServiceImpl extends WxChannelServiceHttpClientImpl { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
单应用 Channel 的 Spring 和 Solon AutoConfiguration 都始终 Useful? React with 👍 / 👎. |
||
|
|
||
| public WxChannelServiceImpl() { | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,17 +24,17 @@ | |
| <artifactId>okhttp</artifactId> | ||
| <scope>provided</scope> | ||
| </dependency> | ||
| <!-- HttpClient 5.x - 默认依赖(推荐使用) --> | ||
| <!-- HttpClient 5.x - 可选依赖,显式使用 HttpComponents 实现时需要 --> | ||
| <dependency> | ||
| <groupId>org.apache.httpcomponents.client5</groupId> | ||
| <artifactId>httpclient5</artifactId> | ||
| <scope>provided</scope> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
这里把 Useful? React with 👍 / 👎. |
||
| </dependency> | ||
|
|
||
| <!-- HttpClient 4.x - 默认依赖(为了保持向后兼容) --> | ||
| <dependency> | ||
| <groupId>org.apache.httpcomponents</groupId> | ||
| <artifactId>httpclient</artifactId> | ||
| <scope>provided</scope> | ||
| <exclusions> | ||
| <exclusion> | ||
| <artifactId>commons-logging</artifactId> | ||
|
|
@@ -45,7 +45,6 @@ | |
| <dependency> | ||
| <groupId>org.apache.httpcomponents</groupId> | ||
| <artifactId>httpmime</artifactId> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. weixin-java-common/pom.xml:47 目前只在 Severity: medium Other Locations
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage. |
||
| <scope>provided</scope> | ||
| </dependency> | ||
|
|
||
| <dependency> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,12 +34,10 @@ | |
| <dependency> | ||
| <groupId>org.apache.httpcomponents</groupId> | ||
| <artifactId>httpclient</artifactId> | ||
|
Comment on lines
35
to
36
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 这些业务模块把 Useful? React with 👍 / 👎. |
||
| <scope>provided</scope> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.httpcomponents</groupId> | ||
| <artifactId>httpmime</artifactId> | ||
| <scope>provided</scope> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.httpcomponents.client5</groupId> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,11 +2,11 @@ | |
|
|
||
| /** | ||
| * <pre> | ||
| * 默认接口实现类,使用apache httpClient 5实现 | ||
| * 默认接口实现类,使用 Apache HttpClient 4 实现. | ||
| * Created by Binary Wang on 2017-5-27. | ||
| * </pre> | ||
| * | ||
| * @author <a href="https://github.com/binarywang">Binary Wang</a> | ||
| */ | ||
| public class WxQidianServiceImpl extends WxQidianServiceHttpComponentsImpl { | ||
| public class WxQidianServiceImpl extends WxQidianServiceHttpClientImpl { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Spring Boot Qidian Starter 的 Useful? React with 👍 / 👎. |
||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.
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.
pom.xml:168 这里在
dependencyManagement中声明的httpclient5没有统一管理成provided/optional,虽然注释写“可选”,但某些模块若未显式写 scope 会把 HC5 以 compile 传递给使用方(例如weixin-java-aispeech当前就是无<scope>声明)。考虑在这里统一约束 scope 以避免依赖树意外变重。Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.