Skip to content

Commit 838e1c2

Browse files
committed
fixed formatting
1 parent 88f832b commit 838e1c2

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

‎spring-rest-simple/src/main/java/org/baeldung/web/controller/FooController.java‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,18 @@ public FooProtos.Foo findProtoById(@PathVariable final long id) {
4545
.setName("Foo Name")
4646
.build();
4747
}
48+
49+
@RequestMapping(method = RequestMethod.POST, value = "/foos/new")
50+
@ResponseStatus(HttpStatus.OK)
51+
@ResponseBody
52+
public Foo createFoo(@RequestBody final Foo foo) {
53+
return foo;
54+
}
55+
56+
@RequestMapping(method = RequestMethod.DELETE, value = "/foos/{id}")
57+
@ResponseStatus(HttpStatus.OK)
58+
@ResponseBody
59+
public long deleteFoo(@PathVariable final long id) {
60+
return id;
61+
}
4862
}

0 commit comments

Comments
 (0)