LearningByExample / reactive-ms-example

An educational project to learn reactive programming with Spring 5
MIT License
175 stars 74 forks source link

compile issues when upgrade the starter-parent from 2.0.0.M1 to 2.0.0.RELEASE #11

Closed lawulu closed 6 years ago

lawulu commented 6 years ago

Thanks for your excellent examples! I can not compile the original project duo to missing some snapshot jars, so I upgrade the pom from M1 to release. But then there are some errors:

//org.learning.by.example.reactive.microservices.handlers.ApiHandler L45

 return address
                .transform(geoLocationService::fromAddress)
                .and(this::sunriseSunset, LocationResponse::new)
                .transform(this::serverResponse);

in the documents: public final Mono<Void> and(Publisher<?> other)

So, I think the method and should only have one param, so it is failed to compile.

juan-medina commented 6 years ago

I need to look at this, probably I need to use the method zip instead.

either:

https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html#zip-reactor.core.publisher.Mono-reactor.core.publisher.Mono-java.util.function.BiFunction-

or

https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html#zip-java.util.function.Function-reactor.core.publisher.Mono...-

juan-medina commented 6 years ago

Finally this is the method to use:

https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html#zipWhen-java.util.function.Function-java.util.function.BiFunction-

juan-medina commented 6 years ago

@lawulu this should be OK now, let me know if you find anything else