requestparam1 [Java] MVC 스프링 RequestParam 예시 HTTP 웹 사이트에서 파라미터 값을 사용할 때에 여러 가지 방법이 있다 그중에 첫 번째 방법은 request.getParameter를 사용해서 넘기는 방법이다 @Slf4j @Controller public class RequestParamController { @RequestMapping("/request-param-v1") public void requestParamV1(HttpServletRequest request, HttpServletResponse response) throws IOException { String username = request.getParameter("username"); int age = Integer.parseInt(request.getParameter("age"));.. 2022. 1. 31. 이전 1 다음