webmagic icon indicating copy to clipboard operation
webmagic copied to clipboard

ThreadSafe相关

Open kyruntime opened this issue 4 years ago • 4 comments

项目里用的0.7.3版本,然后看源码@ThreadSafe找不到,并发的时候,会有什么影响吗。。。。 image

kyruntime avatar May 10 '22 07:05 kyruntime

不存在的话,编译还能通过?

sutra avatar May 10 '22 07:05 sutra

webmagic-0.7.3 所依赖的 httpcore 是4.4.4哦,不是你说的 4.4.13。

[INFO] us.codecraft:webmagic-core:jar:0.7.3
[INFO] +- org.apache.httpcomponents:httpclient:jar:4.5.2:compile
[INFO] |  +- org.apache.httpcomponents:httpcore:jar:4.4.4:compile

sutra avatar May 10 '22 07:05 sutra

webmagic-0.7.3 所依赖的 httpcore 是4.4.4哦,不是你说的 4.4.13。

[INFO] us.codecraft:webmagic-core:jar:0.7.3
[INFO] +- org.apache.httpcomponents:httpclient:jar:4.5.2:compile
[INFO] |  +- org.apache.httpcomponents:httpcore:jar:4.4.4:compile

仔细看了下,是的,引用的是4.4.4

kyruntime avatar May 11 '22 05:05 kyruntime

<dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpcore</artifactId> <version>4.4.4</version> </dependency> 被其他项目的jar包给覆盖掉了,自己在pom里重新引用一下就好了,谢谢sutra提醒。

kyruntime avatar May 11 '22 05:05 kyruntime