[英]class file of org.apache.http.annotation.NotThreadSafe not found,how can i fix it on intellij idea?
message:javac 1.8.0_172 was used to compile java sources
error:java:
Inaccessible org.apache.http.annotation.NotThreadSafe
Can not found class file of org.apache.http.annotation.NotThreadSafe
C:...\common\HttpUtils.java
warn:java:
org.apache.http.impl.client's org.apache.http.impl.client.DefaultHttpClient is obsolete
Thanks in advance.提前致谢。 I am searching for a long time on the net.
我在网上找了很久。 But no use.
但是没有用。 Please help or try to give some ideas how to achieve this.
请帮助或尝试提供一些想法如何实现这一点。
根据此所述@NotThreadSafe
注释应改为@Contract (threading = org.apache.http.annotation.ThreadingBehavior.UNSAFE)
它使用org.apache.http.annotation.Contract
。
Try using 4.5.2 httpclient to 4.4.4 httpcore.尝试使用 4.5.2 httpclient 到 4.4.4 httpcore。
https://httpclient-users.hc.apache.narkive.com/79IE9RdD/trouble-compiling-httpcomponents-client-4-5-2-due-to-missing-org-apache-http-annotation-immutable https://httpclient-users.hc.apache.narkive.com/79IE9RdD/trouble-compiling-httpcomponents-client-4-5-2-due-to-missing-org-apache-http-annotation-immutable
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.