今天在看項目的pom的時候,發(fā)現(xiàn)里面有這么兩個包依賴围俘。
<dependency> <groupId>commons-httpclient</groupId> <artifactId>commons-httpclient</artifactId> <version>3.1</version> </dependency>
<dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> <version>4.5.2</version> </dependency>
發(fā)現(xiàn)項目里面用到它們的地方也差不多妒蛇,都是用來處理http請求机断。去查閱發(fā)現(xiàn),這兩個包在同一個官網(wǎng)上面都可以找到绣夺。
點擊commons-httpclient的鏈接,在頁首寫著這么一句話欢揖。
The Commons HttpClient project is now end of life, and is no longer being developed. It has been replaced by the Apache HttpComponents project in its HttpClient and HttpCore modules, which offer better performance and more flexibility.
上面的意思是:Commons Httpclient這個項目不再進一步完善了陶耍,它已經(jīng)被Httpclient項目的兩個子模塊HttpClient和HttpCore所取代了,后者在持續(xù)更新和完善中她混。
關(guān)于這個問題烈钞,在stackoverflow上面找到有詳細討論。
最后坤按,對于新開的項目毯欣,還是使用httpclient吧。