Use lambda expression for Callable example in ref docs
This commit is contained in:
@@ -4455,13 +4455,7 @@ as the following example shows:
|
|||||||
----
|
----
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public Callable<String> processUpload(final MultipartFile file) {
|
public Callable<String> processUpload(final MultipartFile file) {
|
||||||
|
return () -> "someView";
|
||||||
return new Callable<String>() {
|
|
||||||
public String call() throws Exception {
|
|
||||||
// ...
|
|
||||||
return "someView";
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
----
|
----
|
||||||
[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
|
[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
|
||||||
|
|||||||
Reference in New Issue
Block a user