MCPcopy Create free account
hub / github.com/castello/spring_basic / SimpleRestController

Class SimpleRestController

ch4/SimpleRestController.java:7–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5import org.springframework.web.bind.annotation.*;
6
7@Controller
8public class SimpleRestController {
9 @GetMapping("/ajax")
10 public String ajax() {
11 return "ajax";
12 }
13
14 @PostMapping("/send")
15 @ResponseBody
16 public Person test(@RequestBody Person p) {
17 System.out.println("p = " + p);
18 p.setName("ABC");
19 p.setAge(p.getAge() + 10);
20
21 return p;
22 }
23}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected