Clean up and refactoring

- Upgraded to functions 3.0.2.BS
- Fixed Supplier sample in documentation (see https://stackoverflow.com/questions/59744352/messagedeliveryexception-in-case-of-using-function-and-supplier-in-one-spring-cl)
- Consolidated and simplified logic around bootstrapping multiple argument and single arguments functions
- Added test for useNativeEncoding
This commit is contained in:
Oleg Zhurakousky
2020-01-15 07:05:12 +01:00
parent ca54a9f878
commit 9ce5e57080
4 changed files with 177 additions and 236 deletions

View File

@@ -527,19 +527,20 @@ Consider a different sample:
@SpringBootApplication
public static class SupplierConfiguration {
@Bean
public Supplier<Flux<String>> stringSupplier() {
return () -> Flux.from(emitter -> {
while (true) {
try {
emitter.onNext("Hello from Supplier");
Thread.sleep(1000);
} catch (Exception e) {
// ignore
}
}
});
}
@Bean
public Supplier<Flux<String>> stringSupplier() {
return () -> Flux.fromStream(Stream.generate(new Supplier<String>() {
@Override
public String get() {
try {
Thread.sleep(1000);
return "Hello from Supplier";
} catch (Exception e) {
// ignore
}
}
})).subscribeOn(Schedulers.elastic()).share();
}
}
----