BAEL-5715 Updated Code Formatting

This commit is contained in:
Amar Wadhwani 2022-10-15 11:04:57 +05:30
parent f40f203e9e
commit 0c61184a4f
1 changed files with 6 additions and 4 deletions

View File

@ -13,12 +13,14 @@ import com.baeldung.postman.model.JsonRequest;
public class PostmanUploadController {
@PostMapping("/uploadFile")
public ResponseEntity<String> handleFileUpload(@RequestParam("file") MultipartFile file){
return ResponseEntity.ok().body("file received successfully");
public ResponseEntity<String> handleFileUpload(@RequestParam("file") MultipartFile file) {
return ResponseEntity.ok()
.body("file received successfully");
}
@PostMapping("/uploadJson")
public ResponseEntity<String> handleJsonInput(@RequestBody JsonRequest json){
return ResponseEntity.ok().body(json.getId()+json.getName());
public ResponseEntity<String> handleJsonInput(@RequestBody JsonRequest json) {
return ResponseEntity.ok()
.body(json.getId() + json.getName());
}
}