Skip to content

Instantly share code, notes, and snippets.

@toby55kij
Last active August 21, 2023 08:29
Show Gist options
  • Save toby55kij/bbede38630ef9098480aa28d96f2c08c to your computer and use it in GitHub Desktop.
Save toby55kij/bbede38630ef9098480aa28d96f2c08c to your computer and use it in GitHub Desktop.
ブロッキング処理を呼び出す例1
@GetMapping("/foo/{id}")
public Mono<ReturnValue> get(ServerWebeExchange exchange, @PathVariable Long id) {
return Mono.fromCallable(() -> {
return getValue(id);
});
}
ReturnValue getValue(long id) {
// ブロッキング処理
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment