<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    paulwong

    #

    SPRING CLOUD CONFIG有界面的配置管理中心




    https://dyc87112.github.io/spring-cloud-config-admin/

    posted @ 2021-10-07 16:55 paulwong 閱讀(297) | 評論 (0)編輯 收藏

    開源流程引擎哪個好,如何選型?

    https://zhuanlan.zhihu.com/p/369761832

    posted @ 2021-09-27 11:05 paulwong 閱讀(242) | 評論 (0)編輯 收藏

    Camunda流程引擎

    http://shaochenfeng.com/camunda/

    posted @ 2021-09-27 10:55 paulwong 閱讀(177) | 評論 (0)編輯 收藏

    Camunda/Flowable/Activiti技術發展史

    https://blog.csdn.net/qq_30739519/article/details/86583765

    posted @ 2021-09-27 10:45 paulwong 閱讀(347) | 評論 (0)編輯 收藏

    SPRING INTEGRATION - ENRICH

    enrich時可以發起一個子流程,取得結果后再設置回當前的對象中。

    package org.springframework.integration.stackoverflow.enricher;

    import java.util.List;
    import java.util.Map;
    import java.util.function.Function;
    import java.util.stream.Collectors;

    import org.springframework.boot.SpringApplication;
    import org.springframework.boot.autoconfigure.SpringBootApplication;
    import org.springframework.context.annotation.Bean;
    import org.springframework.http.HttpMethod;
    import org.springframework.integration.dsl.IntegrationFlow;
    import org.springframework.integration.dsl.IntegrationFlows;
    import org.springframework.integration.dsl.Transformers;
    import org.springframework.integration.http.dsl.Http;
    import org.springframework.web.client.RestTemplate;

    @SpringBootApplication
    public class SpringIntegrationEnricherApplication {

        public static void main(String[] args) {
            SpringApplication.run(SpringIntegrationEnricherApplication.class, args);
        }

        @Bean
        public IntegrationFlow jsonEnricherFlow(RestTemplate restTemplate) {
            return IntegrationFlows.from(Function.class)
                    .transform(Transformers.fromJson(Map.class))
                    .enrich((enricher) -> enricher
                            .<Map<String, ?>>requestPayload((message) ->
                                    ((List<?>) message.getPayload().get("attributeIds"))
                                            .stream()
                                            .map(Object::toString)
                                            .collect(Collectors.joining(",")))
                            .requestSubFlow((subFlow) ->
                                    subFlow.handle(
                                            Http.outboundGateway("/attributes?id={ids}", restTemplate)
                                                    .httpMethod(HttpMethod.GET)
                                                    .expectedResponseType(Map.class)
                                                    .uriVariable("ids", "payload")))
                            .propertyExpression("attributes", "payload.attributes"))
                    .<Map<String, ?>, Map<String, ?>>transform(
                            (payload) -> {
                                payload.remove("attributeIds");
                                return payload;
                            })
                    .transform(Transformers.toJson())
                    .get();
        }

    }

    https://stackoverflow.com/questions/58205432/spring-integration-enrich-transform-message-using-rest-call

    https://www.tabnine.com/web/assistant/code/rs/5c781b6ae70f87000197ab9f#L312

    posted @ 2021-09-21 13:40 paulwong 閱讀(274) | 評論 (0)編輯 收藏

    Java9之HttpClient

    Java9之HttpClientAPI實戰詳解
    https://blog.csdn.net/u014042066/article/details/78153653

    Java 9 揭秘(14. HTTP/2 Client API)
    https://www.cnblogs.com/IcanFixIt/p/7229611.html

    Java JDK11(Java11)中設置HttpClient允許不安全的HTTPS連接
    https://www.cjavapy.com/article/84/

    posted @ 2021-09-03 14:04 paulwong 閱讀(216) | 評論 (0)編輯 收藏

    Java 9 Flow API 學習

    https://mrbird.cc/Java-9-Flow-API-Learn.html

    posted @ 2021-09-02 15:39 paulwong 閱讀(204) | 評論 (0)編輯 收藏

    httpClient連接自制SSL證書的rest服務

    通常如果rest服務支持https,需申請收費的ssl證書,但也可自制這種證書。
    httpClient進行鏈接時要進行相應的設置, 主要是設置SSLContext中的TrustSelfSignedStrategy

    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

    posted @ 2021-09-01 14:24 paulwong 閱讀(386) | 評論 (0)編輯 收藏

    nginx 之 proxy_pass詳解

    https://www.jianshu.com/p/b010c9302cd0

    posted @ 2021-08-30 15:16 paulwong 閱讀(170) | 評論 (0)編輯 收藏

    LINUX下循環讀取文件參數并CURL遠程API

    一系列參數存于文本文件,需在LINUX下循環讀取,之后以此參數進行CURL遠程API調用,同時需記錄每次CURL的總時間

    參數文件,test1.json
    {"ADDRESS_FREE":"XXX","NAME":{"SURNAME":"XXX","FIRST_NAME":"XXX"}}
    {"ADDRESS_FREE":"XXX","NAME":{"SURNAME":"XXX","FIRST_NAME":"XXX"}}
    {"ADDRESS_FREE":"XXX","NAME":{"SURNAME":"XXX","FIRST_NAME":"XXX"}}

    test1.sh
    #! /bin/bash

    RESULT_FILE="result.csv"
    echo "" > $RESULT_FILE
    i=1
    while read line || [[ "$line" ]] #In case the file has an incomplete (missing newline) last line, you could use this alternative:
    do 
        echo "$i"
        printf "$i;$line;" >> $RESULT_FILE
        curl -w %{time_total} -o /dev/null -X POST -H "Content-Type:application/json" -d "$line" http://ip:port  >> $RESULT_FILE
        #printf "\n\r" >> $RESULT_FILE
        echo "" >> $RESULT_FILE
        #i=$(( $i + 1 ))
        (( i++ ))
    done < test1.json

    Reference:
    https://stackoverflow.com/questions/30988586/creating-an-array-from-a-text-file-in-bash









    posted @ 2021-08-26 15:40 paulwong 閱讀(529) | 評論 (0)編輯 收藏

    僅列出標題
    共115頁: First 上一頁 7 8 9 10 11 12 13 14 15 下一頁 Last 
    主站蜘蛛池模板: a级毛片免费高清视频| 国内精品免费麻豆网站91麻豆| 精品久久香蕉国产线看观看亚洲| 国产精品99久久免费观看| 亚洲国产av一区二区三区丶| 青青草国产免费久久久下载| 中国videos性高清免费| 亚洲国产精品久久网午夜| 四虎免费久久影院| 99精品视频在线免费观看| 亚洲欧好州第一的日产suv| 亚洲中文字幕在线观看| 成人免费无码大片A毛片抽搐色欲| 日韩大片在线永久免费观看网站| 亚洲精品免费观看| 又黄又爽的视频免费看| 久久综合国产乱子伦精品免费| 怡红院亚洲红怡院在线观看| 久久精品国产亚洲77777| 亚洲XX00视频| 免费在线观看的网站| 成人无码区免费A∨直播| 亚洲大尺度无码无码专线一区| 亚洲成AV人片一区二区| 无码国产亚洲日韩国精品视频一区二区三区| 丝瓜app免费下载网址进入ios| 亚洲综合色丁香婷婷六月图片 | 久久久无码精品亚洲日韩蜜桃| 嫩草视频在线免费观看| 午夜免费啪视频在线观看 | 亚洲?v女人的天堂在线观看| 蜜臀AV免费一区二区三区| 国产无遮挡色视频免费观看性色| 亚洲视频在线观看2018| 亚洲欧洲在线观看| 久久国产成人亚洲精品影院| 日本一道一区二区免费看| 4hu四虎最新免费地址| 91麻豆国产免费观看| 18禁在线无遮挡免费观看网站| 猫咪免费人成在线网站 |