@RequestMapping
@RequestMapping은 Spring MVC에서 사용되는 어노테이션 중 하나로, HTTP 요청과 컨트롤러 메서드를 매핑시키는 역할을 합니다. @RequestMapping 어노테이션을 사용하여 요청 URL과 메서드를 연결할 수 있습니다. 예를 들어, /user URL로 요청이 들어왔을 때 getUserList() 메서드를 호출하고, /user/{id} URL로 요청이 들어왔을 때 getUser() 메서드를 호출하도록 매핑할 수 있습니다. @Controller @RequestMapping("/user") public class UserController { @RequestMapping(method = RequestMethod.GET) public String getUserList(Model model)..
2023.02.24