Use lambda expression for Callable example in ref docs

This commit is contained in:
Sam Brannen 2022-11-17 17:13:26 +01:00
parent 792371ac1f
commit 031adfb8ec
1 changed files with 1 additions and 7 deletions

View File

@ -4455,13 +4455,7 @@ as the following example shows:
----
@PostMapping
public Callable<String> processUpload(final MultipartFile file) {
return new Callable<String>() {
public String call() throws Exception {
// ...
return "someView";
}
};
return () -> "someView";
}
----
[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]