|
@@ -0,0 +1,33 @@
|
|
|
+package com.galaxis.manatee.controller;
|
|
|
+
|
|
|
+import lombok.Data;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @author zcj
|
|
|
+ * @version 0.1
|
|
|
+ * @date 2020/10/27 11:39 上午
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+public class TestController {
|
|
|
+
|
|
|
+
|
|
|
+ @GetMapping("/test/helloGet")
|
|
|
+ public String testGet(){
|
|
|
+ return "hello";
|
|
|
+ }
|
|
|
+
|
|
|
+ @PostMapping("/test/helloPost")
|
|
|
+ public String testPost(@RequestBody PostObject postObject){
|
|
|
+ return "hello";
|
|
|
+ }
|
|
|
+
|
|
|
+ @Data
|
|
|
+ class PostObject{
|
|
|
+ private String a;
|
|
|
+ private String b;
|
|
|
+ }
|
|
|
+}
|