Put
-
HTTP 요청 맵핑하기 2부: URI 패턴 맵핑SPRING/스프링 MVC 2021. 6. 20. 16:10
요청 식별자로 맵핑하기 - @RequestMapping은 다음의 패턴을 지원합니다. - ?: 한 글자 (“/author/???” => “/author/123”) - *: 여러 글자 (“/author/*” => “/author/keesun”) - **: 여러 패스 (“/author/** => “/author/keesun/book”) @Controller public class SampleController { @RequestMapping(value = "/hello", method = {RequestMethod.GET}) @ResponseBody public String hello() { return "hello"; } @RequestMapping(value="/hello/?") @ResponseBody ..