-
-
Save toby55kij/bbede38630ef9098480aa28d96f2c08c to your computer and use it in GitHub Desktop.
ブロッキング処理を呼び出す例1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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