package com.nmgs.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.util.Map;
import java.util.Set;

@Controller
public class LocalController {
    @PostMapping("testPost")
    @ResponseBody
    public String testPost(HttpServletRequest request, @RequestBody Object o) throws IOException {


        Map<String, String[]> map = request.getParameterMap();
        Set<String> keySet = map.keySet();
        for (String string : keySet) {
            System.out.println(map.get(string)[0]);
        }
        return "SUCCESS";
    }
}
