锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲av无码电影网,亚洲av无码专区在线播放,久久久久久久久亚洲http://m.tkk7.com/paulwong/category/55384.htmlzh-cnThu, 02 Dec 2021 09:38:22 GMTThu, 02 Dec 2021 09:38:22 GMT60SPRING CLOUD - REACTIVE FEIGNhttp://m.tkk7.com/paulwong/archive/2021/12/01/436078.htmlpaulwongpaulwongWed, 01 Dec 2021 08:45:00 GMThttp://m.tkk7.com/paulwong/archive/2021/12/01/436078.htmlhttp://m.tkk7.com/paulwong/comments/436078.htmlhttp://m.tkk7.com/paulwong/archive/2021/12/01/436078.html#Feedback0http://m.tkk7.com/paulwong/comments/commentRss/436078.htmlhttp://m.tkk7.com/paulwong/services/trackbacks/436078.html
pom.xml
<dependency>
    <groupId>com.playtika.reactivefeign</groupId>
    <artifactId>feign-reactor-spring-cloud-starter</artifactId>
    <version>3.1.2</version>
    <type>pom</type>
</dependency>


LoanDecisionClientReactive.java
package com.paul.testspringcloudstream.loancheck.service;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import com.paul.testspringcloudstream.common.model.Loan;

import reactivefeign.spring.config.ReactiveFeignClient;
import reactor.core.publisher.Mono;

@ReactiveFeignClient(name = "loan-decision")
public interface LoanDecisionClientReactive {
    
    @PostMapping("/loan-decision")
    public Mono<Loan> getDecision(@RequestBody Loan loan);

}

LoanCheckConfiguration.java
@Configuration
@Import({
    MongoDbConsumerConfiguration.class,
})
@EnableDiscoveryClient
@EnableReactiveFeignClients("com.paul.testspringcloudstream.loancheck.service")
public class LoanCheckConfiguration {
}


浣跨敤鍚宖eign
@Autowired
private LoanDecisionClientReactive loanDecisionClientReactive;

Reference
https://blog.csdn.net/LCBUSHIHAHA/article/details/113817966

瀹樻柟SAMPLE
https://github.com/kptfh/feign-reactive-sample

paulwong 2021-12-01 16:45 鍙戣〃璇勮
]]>
SPRING REACTOR 涔婩lux鍜孧onohttp://m.tkk7.com/paulwong/archive/2021/11/23/436063.htmlpaulwongpaulwongTue, 23 Nov 2021 06:30:00 GMThttp://m.tkk7.com/paulwong/archive/2021/11/23/436063.htmlhttp://m.tkk7.com/paulwong/comments/436063.htmlhttp://m.tkk7.com/paulwong/archive/2021/11/23/436063.html#Feedback0http://m.tkk7.com/paulwong/comments/commentRss/436063.htmlhttp://m.tkk7.com/paulwong/services/trackbacks/436063.htmlSPRING REACTOR 涔婩lux鍜孧ono錛屾湁鐐硅薄SPRING INTEGRATION鐨処ntegrationFlow錛屾湁濡備笅鐗圭偣
  • 瀹氫箟浜嗛拡瀵規煇縐嶇被鍨嬫暟鎹殑澶勭悊嫻佺▼
  • 鍙互榪涜綾誨瀷杞崲
  • 闀挎湡榪愯錛岄櫎闈炶瑕佹眰涓
  • 嫻佺▼涓殑姣忕鎿嶄綔鍙互鍦ㄦ柊鐨勭嚎紼嬩腑鎵ц
  • 鍙互姝e父涓錛屽鏋滀腑閫旀湁寮傚父錛屽垯璇ユ祦紼嬩篃浼氫腑姝?/li>
  • 瑕乻ubscribe錛屾祦紼嬫墠寮濮嬭鍚姩
  • 鍙互鍒嗗壊鎴愬悇涓瓙嫻佺▼
  • 鍙互鑱氬悎瀛愭祦紼?/li>
  • Mono鍙戦佷竴涓暟鎹紝灝卞彂閫佷腑姝俊鍙?/li>
  • Flux鍙戦佷換鎰忔暟鎹紝鐢辯▼搴忓喅瀹氫綍鏃跺彂閫佷腑姝俊鍙?/li>

緙栫▼鍒欐瘮杈冪畝鍗曪紝鍏堟牴鎹笉鍚岀殑鏁版嵁綾誨瀷瀹氫箟涓嶅悓鐨凢lux鎴朚ono錛屼笟鍔℃搷浣滅敤Function鍖呰鍚庯紝鏀懼湪map/flatmap涓紝鍐嶈皟鐢╯ubscribe鍚姩嫻佺▼銆?/div>

paulwong 2021-11-23 14:30 鍙戣〃璇勮
]]>
SPRING REACTOR 浣跨敤鏍蜂緥http://m.tkk7.com/paulwong/archive/2021/11/23/436062.htmlpaulwongpaulwongTue, 23 Nov 2021 05:59:00 GMThttp://m.tkk7.com/paulwong/archive/2021/11/23/436062.htmlhttp://m.tkk7.com/paulwong/comments/436062.htmlhttp://m.tkk7.com/paulwong/archive/2021/11/23/436062.html#Feedback0http://m.tkk7.com/paulwong/comments/commentRss/436062.htmlhttp://m.tkk7.com/paulwong/services/trackbacks/436062.html
package com.paul.testreactivestream.reactor;


import java.util.List;

import org.junit.jupiter.api.Test;

import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import reactor.core.scheduler.Schedulers;

public class SpringReactorTest {
    
    private void subscribeAndEnd(Flux<?> flux) {
        
        flux.map(c -> String.format("[%s] %s", Thread.currentThread().getName(), c))
            .subscribe(System.out::println);
        
        flux.blockLast();
    }
    
    @Test
    public void createAFlux_just() throws InterruptedException {
        Flux<String> fruitFlux = 
                Flux.just("Apple", "Orange", "Grape", "Banana", "Strawberry")
                    .log()
                    ;
        fruitFlux.subscribe(
                     f -> System.out.println(
                                 String.format("[%s] Here's some fruit: %s", Thread.currentThread().getName(), f)
                             )
                  )
                 ;
        fruitFlux.blockLast();
        
//        Thread.currentThread().join();
    }
    
    @Test
    public void zipFluxesToObject() {
        Flux<String> characterFlux = 
                Flux.just("Garfield", "Kojak", "Barbossa");
        
        Flux<String> foodFlux = 
                Flux.just("Lasagna", "Lollipops", "Apples");
        
        Flux<String> zippedFlux = 
                Flux.zip(characterFlux, foodFlux, (c, f) -> c + " eats " + f);
        
        this.subscribeAndEnd(zippedFlux);
    }
    
    @Test
    public void map() {
        Flux<Player> playerFlux = 
                Flux.just("Michael Jordan", "Scottie Pippen", "Steve Kerr")
                    .map(n -> {
                        String[] split = n.split("\\s");
                        return new Player(split[0], split[1]);
                    })
                    ;
        this.subscribeAndEnd(playerFlux);
    }
    
    @Test
    public void flatMap() {
        Flux<Player> playerFlux = 
                Flux.just("Michael Jordan", "Scottie Pippen", "Steve Kerr")
                    .flatMap(
                        n -> Mono.just(n)
                                 .map(p -> {
                                    String[] split = p.split("\\s");
                                    return new Player(split[0], split[1]);
                                  })
                                 .subscribeOn(Schedulers.parallel())
                     );
        this.subscribeAndEnd(playerFlux);
    }
    
    @Test
    public void buffer() {
        Flux<List<String>> fruitFlux = 
                Flux.just(
                        "apple", "orange", "banana", "kiwi", "strawberry"
                     )
                    .buffer(3);
        this.subscribeAndEnd(fruitFlux);
    }
    
    @Test
    public void bufferAsyn() {
        Flux<String> flux =
            Flux.just(
                    "apple", "orange", "banana", "kiwi", "strawberry"
                 )
                .buffer(3)
                .flatMap(x ->
                    Flux.fromIterable(x)
                        .map(y -> y.toUpperCase())
                        .subscribeOn(Schedulers.parallel())
    //                    .log()
                 );
        this.subscribeAndEnd(flux);
    }
    
    @Test
    public void all() {
        Mono<Boolean> animalFlux = 
                Flux.just(
                        "aardvark", "elephant", "koala", "eagle", "kangaroo"
                     )
                    .all(c -> c.contains("a"))
                    ;
        animalFlux.map(c -> String.format("[%s] %s", Thread.currentThread().getName(), c))
                  .subscribe(System.out::println);
    
    }

}


paulwong 2021-11-23 13:59 鍙戣〃璇勮
]]>
SPRING REACTOR璧勬簮http://m.tkk7.com/paulwong/archive/2021/11/23/436061.htmlpaulwongpaulwongTue, 23 Nov 2021 05:51:00 GMThttp://m.tkk7.com/paulwong/archive/2021/11/23/436061.htmlhttp://m.tkk7.com/paulwong/comments/436061.htmlhttp://m.tkk7.com/paulwong/archive/2021/11/23/436061.html#Feedback0http://m.tkk7.com/paulwong/comments/commentRss/436061.htmlhttp://m.tkk7.com/paulwong/services/trackbacks/436061.htmlhttps://www.jianshu.com/p/7ee89f70dfe5

Project Reactor 鏍稿績鍘熺悊瑙f瀽
https://www.jianshu.com/p/df395eb28f69

Project Reactor 涔?publishOn 涓?subscribeOn
https://www.jianshu.com/p/769f6e9824fb

Spring鍝嶅簲寮忕紪紼?br />https://blog.csdn.net/get_set/category_7484996.html











paulwong 2021-11-23 13:51 鍙戣〃璇勮
]]>
Java 9 Flow API 瀛︿範http://m.tkk7.com/paulwong/archive/2021/09/02/435963.htmlpaulwongpaulwongThu, 02 Sep 2021 07:39:00 GMThttp://m.tkk7.com/paulwong/archive/2021/09/02/435963.htmlhttp://m.tkk7.com/paulwong/comments/435963.htmlhttp://m.tkk7.com/paulwong/archive/2021/09/02/435963.html#Feedback0http://m.tkk7.com/paulwong/comments/commentRss/435963.htmlhttp://m.tkk7.com/paulwong/services/trackbacks/435963.htmlhttps://mrbird.cc/Java-9-Flow-API-Learn.html

paulwong 2021-09-02 15:39 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 亚洲一区二区电影| 亚洲中文久久精品无码| 亚洲欧洲日产专区| 99xxoo视频在线永久免费观看| 国产AV无码专区亚洲AVJULIA| 精品国产福利尤物免费| 亚洲午夜无码久久久久| a级精品九九九大片免费看| 亚洲精品国产精品乱码在线观看| 中文字幕无线码免费人妻| 亚洲色无码专区在线观看| 无码A级毛片免费视频内谢| 78成人精品电影在线播放日韩精品电影一区亚洲 | 久久精品视频免费看| 亚洲国产成人久久综合碰碰动漫3d| 污视频在线免费观看| 亚洲制服丝袜一区二区三区| 日韩精品无码区免费专区| 亚洲av永久无码精品网址| 免费一级黄色毛片| 大地资源在线资源免费观看 | 亚洲AV无码一区二区三区人| 无码高潮少妇毛多水多水免费| 亚洲AV无码专区在线电影成人 | 亚洲成?Ⅴ人在线观看无码| 18禁超污无遮挡无码免费网站 | 久久噜噜噜久久亚洲va久| 国产大片91精品免费观看不卡| 中国china体内裑精亚洲日本| 免费少妇a级毛片人成网| 最近的2019免费中文字幕| 亚洲字幕在线观看| 亚洲av成人一区二区三区在线观看| 成年免费a级毛片免费看无码| 亚洲国产美女视频| 全亚洲最新黄色特级网站| 香蕉成人免费看片视频app下载| 亚洲kkk4444在线观看| 国产精品亚洲二区在线观看| 最近2019中文字幕免费大全5| 男女猛烈xx00免费视频试看|