|
|
@@ -1,5 +1,6 @@
|
|
|
package com.example.demo.controllers;
|
|
|
|
|
|
+import com.example.demo.bean.Poi;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
@@ -22,16 +23,18 @@ public class PoiController {
|
|
|
}
|
|
|
|
|
|
@PostMapping("/add")
|
|
|
- public String add(){
|
|
|
+ public String add(@RequestBody Poi info){
|
|
|
+ log.info("name={} description={}",info.name,info.description);
|
|
|
return "this is add";
|
|
|
}
|
|
|
|
|
|
@PutMapping("/edit")
|
|
|
- public String edit(){
|
|
|
+ public String edit(@RequestBody Poi info){
|
|
|
+ log.info("name={} description={}",info.name,info.description);
|
|
|
return "this is edit";
|
|
|
}
|
|
|
|
|
|
- @DeleteMapping("/del")
|
|
|
+ @DeleteMapping("/del/{id}")
|
|
|
public String del(){
|
|
|
return "this is del";
|
|
|
}
|