1. @RequestParam("파라미터") String id

    

    public String example (@RequestParam("id") String id)

   

    요청 : url?id=홍길동

    System.out.println(id); //홍길동

 

2. @RequestBody HashMap<String, String> map 으로받는 방법

    public String example(@RequestBody HashMap<String, String> map)

 

    요청 : url?id=홍길동&age=1&today=20210107

for(Entry<String, String> entry : map.entrySet())
{
	System.out.println(String.format("key: %s, val: %s", entry.getKey(), entry.getValue()));
}

key:  id val: 홍길동

key:  age  val: 1

key: today val: 20210107