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

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

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

    paulwong

    #

    zip4j

    縮解壓ZIP之Zip4j
    https://rensanning.iteye.com/blog/1836727

    posted @ 2019-06-10 16:47 paulwong 閱讀(344) | 評論 (0)編輯 收藏

    Message Processing With Spring Integration

    Full demo
    https://dzone.com/articles/message-processing-spring

    posted @ 2019-06-05 11:08 paulwong 閱讀(342) | 評論 (0)編輯 收藏

    Spring integration 基本概念

    1.spring integration 's architecture

    主要提供兩個功能:

    在系統內提供實現輕量級、事件驅動交互行為的框架

    在系統間提供一種基于適配器的平臺,以支持靈活的系統間交互

    2.spring integration對于企業集成模式的支持

    2.1Message:一個信息的單元,通常有消息頭(header)和消息內容(payload)組成

    2.2Message channel:消息處理節點之間的連接,負責將Message從生產者傳輸到消費者。

        根據消費者的多少,可分為point to point和publish-subscribe兩種


        根據消息傳輸方式的不同,分為同步和異步兩種

    2.3Message Endpoint:消息處理節點,消息從節點進入通道,也是從節點離開通道

    幾個常見的Message EndPoint:

    CHANNEL ADAPTER,用于連接該適配器的特點是單向消息流的,要么是消息通過該適配器進入通道,要么是消息通過該適配器離開通道


    MESSAGING GATEWAY,處理的消息流和Channel Adapter不同,不是單向的,即有進入該節點的消息,也會從該節點發出消息。



    SERVICE ACTIVATOR,該節點調用服務來處理輸入的消息,并將服務返回的數據發送到輸出通道。在spring integration中,調用的方法被限定為本地方法調用。


    ROUTER,路由器,將輸入的消息路由到某個輸出通道中


    SPLITTER,將輸入的消息拆分成子消息


    AGGREGATOR,將輸入的多個消息合并為一個消息


    3.觀看書中例子hello-world思考

    測試gateway時,下面代碼向通道names內放入消息world?


    然后service-activator從names通道中獲得消息world,調用方法sayHello返回值到給gateway?

    解釋:gateway有一個service-interface的屬性,這個屬性指向一個interface。當我們用一個接口聲明一個gateway時,spring integration會自動幫我們生成該接口的代理類,這樣當我們往gateway發送消息時,spring integration會通過代理類把消息轉發到default-request-channel中去



    作者:馬國標
    鏈接:https://www.jianshu.com/p/bf1643539f99
    來源:簡書
    簡書著作權歸作者所有,任何形式的轉載都請聯系作者獲得授權并注明出處。

    posted @ 2019-06-05 10:36 paulwong 閱讀(890) | 評論 (0)編輯 收藏

    如何在SPRING INTEGRATION中使用事務

    File Polling using the Spring Integration DSL
    http://porterhead.blogspot.com/2016/07/file-polling-using-spring-integration.html

    https://github.com/iainporter/spring-file-poller



    Transaction Support in Spring Integration
    https://www.baeldung.com/spring-integration-transaction

    posted @ 2019-06-04 14:19 paulwong 閱讀(431) | 評論 (0)編輯 收藏

    SpringBoot使用MongoDB異常問題

    https://www.cnblogs.com/linzhanfly/p/9674778.html

    posted @ 2019-05-29 16:58 paulwong 閱讀(434) | 評論 (0)編輯 收藏

    MONGODB去除_class字段

    加上此配置:

    MongodbConfiguration.java
    import org.springframework.beans.factory.annotation.Autowired;
    import org.springframework.context.annotation.Bean;
    import org.springframework.context.annotation.Configuration;
    import org.springframework.data.mongodb.MongoDbFactory;
    import org.springframework.data.mongodb.core.convert.DbRefResolver;
    import org.springframework.data.mongodb.core.convert.DefaultDbRefResolver;
    import org.springframework.data.mongodb.core.convert.DefaultMongoTypeMapper;
    import org.springframework.data.mongodb.core.convert.MappingMongoConverter;
    import org.springframework.data.mongodb.core.mapping.MongoMappingContext;
     
    @Configuration
    public class AppMongoConfig {
      @Autowired private MongoDbFactory mongoDbFactory;
     
      @Autowired private MongoMappingContext mongoMappingContext;
     
      @Bean
      public MappingMongoConverter mappingMongoConverter() {
     
        DbRefResolver dbRefResolver = new DefaultDbRefResolver(mongoDbFactory);
        MappingMongoConverter converter = new MappingMongoConverter(dbRefResolver, mongoMappingContext);
        converter.setTypeMapper(new DefaultMongoTypeMapper(null));
     
        return converter;
      }
    }

    posted @ 2019-05-29 14:18 paulwong 閱讀(1219) | 評論 (0)編輯 收藏

    JAVA 8 TIME

    Java 8新特性(四):新的時間和日期API
    https://lw900925.github.io/java/java8-newtime-api.html
     

    posted @ 2019-05-09 10:15 paulwong 閱讀(356) | 評論 (0)編輯 收藏

    SPRING BOOT BATCH資源

     Spring Boot下Spring Batch入門實例
    https://www.jianshu.com/p/305192ea4cb1
     

    SPRING BATCH + QUARTZ
    https://examples.javacodegeeks.com/enterprise-java/spring/batch/quartz-spring-batch-example/
    https://blog.kingbbode.com/posts/spring-batch-quartz

    Spring Batch Tutorial: Batch Processing Made Easy with Spring
    https://www.toptal.com/spring/spring-batch-tutorial

    posted @ 2019-05-07 17:07 paulwong 閱讀(373) | 評論 (0)編輯 收藏

    以流的方式解釋巨大JSON文件

    https://www.ngdata.com/parsing-a-large-json-file-efficiently-and-easily/


    https://sites.google.com/site/gson/streaming

    http://www.acuriousanimal.com/2015/10/23/reading-json-file-in-stream-mode-with-gson.html

        public static void main(String [] args) throws IOException {
            String filePath = "C:big-data.json";
            FileInputStream in = new FileInputStream(new File(filePath));
            JsonReader reader = new JsonReader(new InputStreamReader(in, "UTF-8"));
            Gson gson = new GsonBuilder().create();
    //        reader.beginObject();
    //        reader.nextName();
            reader.beginObject();//跳過"{"
            while (reader.hasNext()) {
                // Read data into object model
                JsonToken jsonToken = reader.peek();
                if(jsonToken.equals(JsonToken.NAME)) {
                    String name = reader.nextName();
                    if(name.equalsIgnoreCase("SUMMARY")) {
    //                    reader.beginObject();
                        Summary summary = gson.fromJson(reader, Summary.class);
                        logger.info(summary.toString());
                        break;
    //                    reader.endObject();//跳過"}"
                    }
                } /*else if(jsonToken.equals(JsonToken.BEGIN_OBJECT)) {
                    reader.beginObject();
                } else if(jsonToken.equals(JsonToken.STRING)) {
                    logger.info(reader.nextString());
                } else if(jsonToken.equals(JsonToken.NUMBER)) {
                    logger.info(reader.nextInt() + "");
                } else if(jsonToken.equals(JsonToken.END_OBJECT)) {
                    reader.endObject();
                } 
    */
    //            Summary summary = gson.fromJson(reader, Summary.class);
    //            break;
            }
            reader.close();
        }

    posted @ 2019-05-03 15:22 paulwong 閱讀(523) | 評論 (0)編輯 收藏

    定時任務管理系統資源

    SpringBoot 整合 Quartz 實現定時任務管理模塊
    https://juejin.im/post/5a7157f56fb9a01cb049a158

    posted @ 2019-04-25 17:03 paulwong 閱讀(358) | 評論 (0)編輯 收藏

    僅列出標題
    共115頁: First 上一頁 26 27 28 29 30 31 32 33 34 下一頁 Last 
    主站蜘蛛池模板: 日本卡1卡2卡三卡免费| 成年女人毛片免费视频| 美女裸身网站免费看免费网站| 亚洲乱码日产精品a级毛片久久| 综合自拍亚洲综合图不卡区| 精品一区二区三区免费毛片| 91短视频在线免费观看| 久久国产亚洲精品麻豆| 免费的黄色的网站| 国产在线观看免费完整版中文版| 亚洲黄色免费观看| 日韩免费福利视频| 精品亚洲国产成人av| 天天拍拍天天爽免费视频| 亚洲欧洲国产经精品香蕉网| 131美女爱做免费毛片| 亚洲AV成人无码久久精品老人| www永久免费视频| 亚洲av无码国产精品色在线看不卡| 亚洲午夜成人精品无码色欲| 久久天天躁狠狠躁夜夜免费观看| 亚洲国产成人久久| 国产精品久久久久免费a∨| 一级黄色毛片免费看| 亚洲天堂一区二区三区| 亚洲男人的天堂一区二区| 91情侣在线精品国产免费| 二区久久国产乱子伦免费精品| 亚洲无码精品浪潮| 91在线视频免费观看| 久久久亚洲精品无码| 国产美女无遮挡免费视频| 在线观看免费中文视频| 一级做a爰片久久毛片免费陪 | www国产亚洲精品久久久日本| 国产成人亚洲毛片| 亚洲成人免费在线观看| 亚洲精品tv久久久久久久久| 在线免费中文字幕| 99精品视频免费| 产传媒61国产免费|