ï»??xml version="1.0" encoding="utf-8" standalone="yes"?>精品丝袜一区二区三区,在线观看中文字幕,综合国产视频http://www.aygfsteel.com/paulwong/category/53443.htmlzh-cnFri, 03 Sep 2021 07:53:04 GMTFri, 03 Sep 2021 07:53:04 GMT60Java9之HttpClienthttp://www.aygfsteel.com/paulwong/archive/2021/09/03/435964.htmlpaulwongpaulwongFri, 03 Sep 2021 06:04:00 GMThttp://www.aygfsteel.com/paulwong/archive/2021/09/03/435964.htmlhttp://www.aygfsteel.com/paulwong/comments/435964.htmlhttp://www.aygfsteel.com/paulwong/archive/2021/09/03/435964.html#Feedback0http://www.aygfsteel.com/paulwong/comments/commentRss/435964.htmlhttp://www.aygfsteel.com/paulwong/services/trackbacks/435964.htmlJava9之HttpClientAPI实战详解
https://blog.csdn.net/u014042066/article/details/78153653

Java 9 æ­ç§˜åQ?4. HTTP/2 Client APIåQ?br />https://www.cnblogs.com/IcanFixIt/p/7229611.html

Java JDK11(Java11)中设¾|®HttpClient允许不安全的HTTPS˜qžæŽ¥
https://www.cjavapy.com/article/84/

]]>
httpClient˜qžæŽ¥è‡ªåˆ¶SSL证书的rest服务http://www.aygfsteel.com/paulwong/archive/2021/09/01/435961.htmlpaulwongpaulwongWed, 01 Sep 2021 06:24:00 GMThttp://www.aygfsteel.com/paulwong/archive/2021/09/01/435961.htmlhttp://www.aygfsteel.com/paulwong/comments/435961.htmlhttp://www.aygfsteel.com/paulwong/archive/2021/09/01/435961.html#Feedback0http://www.aygfsteel.com/paulwong/comments/commentRss/435961.htmlhttp://www.aygfsteel.com/paulwong/services/trackbacks/435961.htmlhttpClient˜q›è¡Œé“¾æŽ¥æ—¶è¦˜q›è¡Œç›¸åº”的设¾|®ï¼Œ ä¸»è¦æ˜¯è®¾¾|®SSLContext中的TrustSelfSignedStrategyåQ?br />
import java.security.KeyManagementException;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.util.concurrent.TimeUnit;

import javax.net.ssl.SSLContext;

import org.apache.http.client.config.RequestConfig;
import org.apache.http.conn.ssl.TrustSelfSignedStrategy;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
import org.apache.http.ssl.SSLContexts;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


@Configuration
public class HttpClientConfiguration {
    
    
    @Bean
    public PoolingHttpClientConnectionManager poolingHttpClientConnectionManager(AbstractProperties kycProperties) {
        PoolingHttpClientConnectionManager result = 
                new PoolingHttpClientConnectionManager(
                        kycProperties.getHttpConnectionTimeToLiveMinu(), 
                        TimeUnit.MINUTES
                    );
        result.setMaxTotal(200);
        result.setDefaultMaxPerRoute(20);
        return result;
    }

    @Bean
    public RequestConfig requestConfig(AbstractProperties kycProperties) {
        return RequestConfig
                    .custom()
                  .setConnectionRequestTimeout(kycProperties.getHttpConnectionTimeout())
                  .setConnectTimeout(kycProperties.getHttpConnectionTimeout())
                  .setSocketTimeout(kycProperties.getHttpConnectionTimeout())
                  .build();
    }
    
    @Bean
    public SSLContext sslContext() throws KeyManagementException, NoSuchAlgorithmException, KeyStoreException {

        return SSLContexts
                    .custom()
                    .loadTrustMaterial(nullnew TrustSelfSignedStrategy())
                    .build()
                    ;
    }

    @Bean
    public CloseableHttpClient httpClient(AbstractProperties kycProperties) throws KeyManagementException, NoSuchAlgorithmException, KeyStoreException {
        return HttpClients
                  .custom()
//                  .setConnectionManager(poolingHttpClientConnectionManager(null))
                  .setDefaultRequestConfig(requestConfig(null))
                  .setKeepAliveStrategy(
                          new MyConnectionKeepAliveStrategy(
                                  kycProperties.getHttpConnectionTimeToLiveMinu(), 
                                  TimeUnit.MINUTES
                              )
                   )
                  .setMaxConnTotal(200)
                  .setMaxConnPerRoute(20)
//                  .setConnectionTimeToLive(
//                          kycProperties.getHttpConnectionTimeToLiveMinu(), 
//                          TimeUnit.MINUTES
//                   )
                  .setSSLContext(sslContext())
                  .build();
    }

}

相应讄¡½®
http-connection-timeout: 30000
http-connection-time-to-live-minu: 5


]]>
http connection存活æœ?/title><link>http://www.aygfsteel.com/paulwong/archive/2020/12/31/435760.html</link><dc:creator>paulwong</dc:creator><author>paulwong</author><pubDate>Thu, 31 Dec 2020 07:08:00 GMT</pubDate><guid>http://www.aygfsteel.com/paulwong/archive/2020/12/31/435760.html</guid><wfw:comment>http://www.aygfsteel.com/paulwong/comments/435760.html</wfw:comment><comments>http://www.aygfsteel.com/paulwong/archive/2020/12/31/435760.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/paulwong/comments/commentRss/435760.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/paulwong/services/trackbacks/435760.html</trackback:ping><description><![CDATA[HTTP1.1的链接,默认是长链接åQŒä¸ä¼šä¸»åЍ关闭ã€?br /><div>LINUX会默认保留链æŽ?天再关闭ã€?/div>建立HTTP链接其实也是调用TCL的协议去建立åQŒåŒ…括开始的时候有三次握手åQŒå…³é—­çš„æ—¶å€™æœ‰å››æ¬¡æ¡æ‰‹ã€‚关闭链接双斚wƒ½å¯ä»¥å‘è“vã€?br />但这些链接可能会被防火墙å…ÏxŽ‰è€Œä¸é€šçŸ¥å»ºç«‹é“¾æŽ¥çš„åŒæ–¹ï¼Œå› æ­¤è®„¡½®éœ€è®„¡½®é“¾æŽ¥çš„å­˜‹zÀLœŸã€?br />使用httpClient的链接池æ—Óž¼Œè¦è®¾¾|®æ± ä¸­çš„链接存活期或讄¡½®å­˜æ´»½{–ç•¥ã€?br />‹‚€‹¹‹å­˜‹zÀLœŸåªåœ¨æ¯æ¬¡å‘送数据时åQŒæ‰‹‚€‹¹‹å–出的链接是否­‘…过存活期,如超˜q‡åˆ™å…³é—­ã€?br />讄¡½®å­˜æ´»æœŸçš„½{–ç•¥åQ?br /><br /><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: #0000FF; ">import</span> java.util.concurrent.TimeUnit;<br /><br /><span style="color: #0000FF; ">import</span> org.apache.http.HeaderElement;<br /><span style="color: #0000FF; ">import</span> org.apache.http.HeaderElementIterator;<br /><span style="color: #0000FF; ">import</span> org.apache.http.HttpResponse;<br /><span style="color: #0000FF; ">import</span> org.apache.http.conn.ConnectionKeepAliveStrategy;<br /><span style="color: #0000FF; ">import</span> org.apache.http.message.BasicHeaderElementIterator;<br /><span style="color: #0000FF; ">import</span> org.apache.http.protocol.HTTP;<br /><span style="color: #0000FF; ">import</span> org.apache.http.protocol.HttpContext;<br /><span style="color: #0000FF; ">import</span> org.apache.http.util.Args;<br /><br /><span style="color: #0000FF; ">public</span> <span style="color: #0000FF; ">class</span> MyConnectionKeepAliveStrategy <span style="color: #0000FF; ">implements</span> ConnectionKeepAliveStrategy{<br />    <br />    <br />    <span style="color: #0000FF; ">private</span> <span style="color: #0000FF; ">int</span> timeToLive;<br />    <span style="color: #0000FF; ">private</span> TimeUnit timeUnit;<br /><br />    <span style="color: #0000FF; ">public</span> MyConnectionKeepAliveStrategy(<span style="color: #0000FF; ">int</span> timeToLive, TimeUnit timeUnit) {<br />        <span style="color: #0000FF; ">this</span>.timeToLive = timeToLive;<br />        <span style="color: #0000FF; ">this</span>.timeUnit = timeUnit;<br />    }<br /><br />    @Override<br />    <span style="color: #0000FF; ">public</span> <span style="color: #0000FF; ">long</span> getKeepAliveDuration(<span style="color: #0000FF; ">final</span> HttpResponse response, <span style="color: #0000FF; ">final</span> HttpContext context) {<br />        Args.notNull(response, "HTTP response");<br />        <span style="color: #0000FF; ">final</span> HeaderElementIterator it = <span style="color: #0000FF; ">new</span> BasicHeaderElementIterator(<br />                response.headerIterator(HTTP.CONN_KEEP_ALIVE));<br />        <span style="color: #0000FF; ">while</span> (it.hasNext()) {<br />            <span style="color: #0000FF; ">final</span> HeaderElement he = it.nextElement();<br />            <span style="color: #0000FF; ">final</span> String param = he.getName();<br />            <span style="color: #0000FF; ">final</span> String value = he.getValue();<br />            <span style="color: #0000FF; ">if</span> (value != <span style="color: #0000FF; ">null</span> && param.equalsIgnoreCase("timeout")) {<br />                <span style="color: #0000FF; ">try</span> {<br />                    <span style="color: #0000FF; ">return</span> Long.parseLong(value) * 1000;<br />                } <span style="color: #0000FF; ">catch</span>(<span style="color: #0000FF; ">final</span> NumberFormatException ignore) {<br />                    <span style="color: #008000; ">//</span><span style="color: #008000; ">do nothing</span><span style="color: #008000; "><br /></span>                }<br />            }<br />        }<br />        <span style="color: #0000FF; ">return</span> timeUnit.toMillis(timeToLive);<br />    }<br /><br />}</div><br />《HttpClient官方文档ã€?.6 ˜qžæŽ¥¾l´æŒå­˜æ´»½{–ç•¥<br /><a target="_blank">http://ifeve.com/httpclient-2-6/</a><br /><br />httpclient˜qžæŽ¥æ± ç®¡ç†ï¼Œä½ ç”¨å¯¹äº†åQ?br /><a target="_blank">http://ifeve.com/http-connection-pool/</a><br /><br />HttpClient˜qžæŽ¥æ± çš„一些思è€?br /><a target="_blank">https://zhuanlan.zhihu.com/p/85524697</a><br /><br />HTTP协议的Keep-Alive 模式<br /><a target="_blank">https://www.jianshu.com/p/49551bda6619</a><img src ="http://www.aygfsteel.com/paulwong/aggbug/435760.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/paulwong/" target="_blank">paulwong</a> 2020-12-31 15:08 <a href="http://www.aygfsteel.com/paulwong/archive/2020/12/31/435760.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>httpClient Connection Pool使用的正¼‹®å§¿åŠ?/title><link>http://www.aygfsteel.com/paulwong/archive/2020/12/29/435757.html</link><dc:creator>paulwong</dc:creator><author>paulwong</author><pubDate>Tue, 29 Dec 2020 01:36:00 GMT</pubDate><guid>http://www.aygfsteel.com/paulwong/archive/2020/12/29/435757.html</guid><wfw:comment>http://www.aygfsteel.com/paulwong/comments/435757.html</wfw:comment><comments>http://www.aygfsteel.com/paulwong/archive/2020/12/29/435757.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/paulwong/comments/commentRss/435757.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/paulwong/services/trackbacks/435757.html</trackback:ping><description><![CDATA[<div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: #0000FF; ">import</span> java.util.concurrent.TimeUnit;<br /> <br /> <span style="color: #0000FF; ">import</span> org.apache.http.client.config.RequestConfig;<br /> <span style="color: #0000FF; ">import</span> org.apache.http.impl.client.CloseableHttpClient;<br /> <span style="color: #0000FF; ">import</span> org.apache.http.impl.client.HttpClients;<br /> <span style="color: #0000FF; ">import</span> org.apache.http.impl.conn.PoolingHttpClientConnectionManager;<br /> <span style="color: #0000FF; ">import</span> org.springframework.context.annotation.Bean;<br /> <span style="color: #0000FF; ">import</span> org.springframework.context.annotation.Configuration;<br /> <br /> <br /> @Configuration<br /> <span style="color: #0000FF; ">public</span> <span style="color: #0000FF; ">class</span> HttpClientConfiguration {<br />     <br />     <br />     @Bean<br />       <span style="color: #0000FF; ">public</span> PoolingHttpClientConnectionManager poolingHttpClientConnectionManager() {<br />         PoolingHttpClientConnectionManager result = <br />                 <span style="color: #0000FF; ">new</span> PoolingHttpClientConnectionManager(5, TimeUnit.MINUTES);<br />         result.setMaxTotal(20);<br />         result.setDefaultMaxPerRoute(20);<br />         <span style="color: #0000FF; ">return</span> result;<br />       }<br /> <br />       @Bean<br />       <span style="color: #0000FF; ">public</span> RequestConfig requestConfig(KycProperties kycProperties) {<br />           <span style="color: #0000FF; ">return</span> RequestConfig<br />                         .custom()<br />                       .setConnectionRequestTimeout(kycProperties.getHttpConnectionTimeout())<br />                       .setConnectTimeout(kycProperties.getHttpConnectionTimeout())<br />                       .setSocketTimeout(kycProperties.getHttpConnectionTimeout())<br />                       .build();<br />       }<br /> <br />       @Bean<br />       <span style="color: #0000FF; ">public</span> CloseableHttpClient httpClient(PoolingHttpClientConnectionManager poolingHttpClientConnectionManager, RequestConfig requestConfig) {<br />           <span style="color: #0000FF; ">return</span> HttpClients<br />                       .custom()<br />                       .setConnectionManager(poolingHttpClientConnectionManager)<br />                       .setDefaultRequestConfig(requestConfig)<br />                       .build();<br />       }<br /> <br /> }</div> <br /> Troubleshooting Spring's RestTemplate Requests Timeout<br /> <a target="_blank">https://tech.asimio.net/2016/12/27/Troubleshooting-Spring-RestTemplate-Requests-Timeout.html</a> a<br /><br />httpclient­‘…时重试记录<br /><a target="_blank">https://blog.csdn.net/wanghao112956/article/details/102967930</a><img src ="http://www.aygfsteel.com/paulwong/aggbug/435757.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/paulwong/" target="_blank">paulwong</a> 2020-12-29 09:36 <a href="http://www.aygfsteel.com/paulwong/archive/2020/12/29/435757.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>深入‹¹…出 RetrofitåQŒè¿™ä¹ˆç‰›é€¼çš„æ¡†æž¶ä½ ä»¬˜q˜ä¸æ¥çœ‹çœ‹ï¼Ÿhttp://www.aygfsteel.com/paulwong/archive/2020/09/16/435663.htmlpaulwongpaulwongWed, 16 Sep 2020 01:41:00 GMThttp://www.aygfsteel.com/paulwong/archive/2020/09/16/435663.htmlhttp://www.aygfsteel.com/paulwong/comments/435663.htmlhttp://www.aygfsteel.com/paulwong/archive/2020/09/16/435663.html#Feedback0http://www.aygfsteel.com/paulwong/comments/commentRss/435663.htmlhttp://www.aygfsteel.com/paulwong/services/trackbacks/435663.htmlhttps://segmentfault.com/a/1190000005638577



]]>
HTTPCLIENT之COOKIE资源http://www.aygfsteel.com/paulwong/archive/2013/03/31/397191.htmlpaulwongpaulwongSun, 31 Mar 2013 01:18:00 GMThttp://www.aygfsteel.com/paulwong/archive/2013/03/31/397191.htmlhttp://www.aygfsteel.com/paulwong/comments/397191.htmlhttp://www.aygfsteel.com/paulwong/archive/2013/03/31/397191.html#Feedback0http://www.aygfsteel.com/paulwong/comments/commentRss/397191.htmlhttp://www.aygfsteel.com/paulwong/services/trackbacks/397191.html
Get Cookie value and set cookie value
http://www.java2s.com/Code/Java/Apache-Common/GetCookievalueandsetcookievalue.hm

How can I get the cookies from HttpClient?
http://stackoverflow.com/questions/8733758/how-can-i-get-the-cookies-from-httpclient

HttpClient 4.x how to use cookies?
http://stackoverflow.com/questions/8795911/httpclient-4-x-how-to-use-cookies

Apache HttpClient 4.0.3 - how do I set cookie with sessionID for POST request
http://stackoverflow.com/questions/4166129/apache-httpclient-4-0-3-how-do-i-set-cookie-with-sessionid-for-post-request

!!HttpClient Cookies
http://blog.csdn.net/mgoann/article/details/4057064

Chapter 3. HTTP state management
http://hc.apache.org/httpcomponents-client-ga/tutorial/html/statemgmt.html

!!!contact-list¾cÕdº“依赖包之commons-httpclient
http://flyerhzm.github.com/2009/08/23/contact-list-library-dependencies-of-commons-httpclient/

]]>
伪造IP、COOKIE的那些事http://www.aygfsteel.com/paulwong/archive/2013/03/28/397095.htmlpaulwongpaulwongThu, 28 Mar 2013 03:17:00 GMThttp://www.aygfsteel.com/paulwong/archive/2013/03/28/397095.htmlhttp://www.aygfsteel.com/paulwong/comments/397095.htmlhttp://www.aygfsteel.com/paulwong/archive/2013/03/28/397095.html#Feedback0http://www.aygfsteel.com/paulwong/comments/commentRss/397095.htmlhttp://www.aygfsteel.com/paulwong/services/trackbacks/397095.htmlhttp://www.udpwork.com/item/8135.html

http://wangjinyang.blog.sohu.com/101351399.html








]]>
JSOUP资源http://www.aygfsteel.com/paulwong/archive/2013/03/24/396917.htmlpaulwongpaulwongSun, 24 Mar 2013 03:46:00 GMThttp://www.aygfsteel.com/paulwong/archive/2013/03/24/396917.htmlhttp://www.aygfsteel.com/paulwong/comments/396917.htmlhttp://www.aygfsteel.com/paulwong/archive/2013/03/24/396917.html#Feedback0http://www.aygfsteel.com/paulwong/comments/commentRss/396917.htmlhttp://www.aygfsteel.com/paulwong/services/trackbacks/396917.html
http://my.oschina.net/dfsfsdf/blog/116279

]]>
Httpclient资源http://www.aygfsteel.com/paulwong/archive/2013/03/01/395946.htmlpaulwongpaulwongFri, 01 Mar 2013 10:11:00 GMThttp://www.aygfsteel.com/paulwong/archive/2013/03/01/395946.htmlhttp://www.aygfsteel.com/paulwong/comments/395946.htmlhttp://www.aygfsteel.com/paulwong/archive/2013/03/01/395946.html#Feedback0http://www.aygfsteel.com/paulwong/comments/commentRss/395946.htmlhttp://www.aygfsteel.com/paulwong/services/trackbacks/395946.htmlhttp://www.cnblogs.com/wasp520/archive/2012/06/28/2568897.html




http://blog.csdn.net/madding/article/details/7638807


抓来的内容当然要提取了:

http://www.oschina.net/p/jsoup

http://www.oschina.net/p/htmlparser

http://www.open-open.com/jsoup/

]]>
Ö÷Õ¾Ö©Öë³ØÄ£°å£º ÔÆÁÖÏØ| ´ó¹ØÏØ| Ðû³ÇÊÐ| ¶«Ý¸ÊÐ| ÈêÑôÏØ| °ÝÈªÏØ| °²Î÷ÏØ| °²¼ªÏØ| ´Ó½­ÏØ| ÂåÄþÏØ| Ë®¸»ÏØ| Ѱµé| ´ÈϪÊÐ| ½´¨ÏØ| ÈðÀöÊÐ| ×ÛÒÕ| ÐÁ¼¯ÊÐ| ÌúÁëÊÐ| ºÚÁú½­Ê¡| â¿µÏØ| ÐĮ̈ÊÐ| ÊÖ»ú| °×Ë®ÏØ| ÁèÔÆÏØ| Ð˰²ÏØ| ÕØÖÝÏØ| Ç­Î÷| µÂÇìÏØ| ÎÞÎªÏØ| ÖÛÇúÏØ| ÏÉÌÒÊÐ| ÕØÖÝÏØ| ²¨ÃÜÏØ| ³¯ÑôÊÐ| Â«É½ÏØ| ÖÐÄþÏØ| ÌÆºÓÏØ| ¸£ÈªÊÐ| ÂÛ̳| ÎäÇ¿ÏØ| °¢°Í¸ÂÆì|