|
|
@@ -0,0 +1,30 @@
|
|
|
+package com.uas.ps.inquiry.controller;
|
|
|
+
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.uas.ps.inquiry.entity.MessageModel;
|
|
|
+import org.springframework.ui.ModelMap;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 测试post数据传输
|
|
|
+ *
|
|
|
+ * Created by hejq on 2018-02-01.
|
|
|
+ */
|
|
|
+@RequestMapping(value = "/postData")
|
|
|
+@RestController
|
|
|
+public class PostDataController {
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 测试post传输
|
|
|
+ *
|
|
|
+ * @param model
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(method = RequestMethod.POST)
|
|
|
+ public ModelMap getPostInfo(@RequestBody MessageModel model) {
|
|
|
+ return new ModelMap("info", JSONObject.toJSON(model));
|
|
|
+ }
|
|
|
+}
|