Skip to content

Commit

Permalink
Remove all method with param directly return in RestService (apache#9234
Browse files Browse the repository at this point in the history
)
  • Loading branch information
AlbumenJ authored Nov 8, 2021
1 parent 988c00f commit c1bb96a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,24 +48,22 @@ public String param(@RequestParam(defaultValue = "value-param") String param) {
@Override
@PostMapping("/params")
public String params(@RequestParam(defaultValue = "value-a") int a, @RequestParam(defaultValue = "value-b") String b) {
return a + b;
return null;
}

@Override
@GetMapping("/headers")
public String headers(@RequestHeader(name = "h", defaultValue = "value-h") String header,
@RequestHeader(name = "h2", defaultValue = "value-h2") String header2,
@RequestParam(value = "v", defaultValue = "1") Integer param) {
String result = header + " , " + header2 + " , " + param;
return result;
return null;
}

@Override
@GetMapping("/path-variables/{p1}/{p2}")
public String pathVariables(@PathVariable("p1") String path1,
@PathVariable("p2") String path2, @RequestParam("v") String param) {
String result = path1 + " , " + path2 + " , " + param;
return result;
return null;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,24 +48,22 @@ public String param(@RequestParam(defaultValue = "value-param") String param) {
@Override
@PostMapping("/params")
public String params(@RequestParam(defaultValue = "value-a") int a, @RequestParam(defaultValue = "value-b") String b) {
return a + b;
return null;
}

@Override
@GetMapping("/headers")
public String headers(@RequestHeader(name = "h", defaultValue = "value-h") String header,
@RequestHeader(name = "h2", defaultValue = "value-h2") String header2,
@RequestParam(value = "v", defaultValue = "1") Integer param) {
String result = header + " , " + header2 + " , " + param;
return result;
return null;
}

@Override
@GetMapping("/path-variables/{p1}/{p2}")
public String pathVariables(@PathVariable("p1") String path1,
@PathVariable("p2") String path2, @RequestParam("v") String param) {
String result = path1 + " , " + path2 + " , " + param;
return result;
return null;
}

@Override
Expand Down

0 comments on commit c1bb96a

Please sign in to comment.