스프링 인프런 김영한
8. Hello 서블릿
스프링 부트 환경에서 서블릿 등록하고 사용해보자.
서블릿은 톰캣 같은 웹 애플리케이션 서버를 직접 설치하고,그 위에 서블릿 코드를 클래스 파일로 빌드해서 올린 다음 톰캣 서버를 실행하면 된다.
하지만 이 과정은 매우 번거롭다.
스프링 부트는 톰캣 서버를 내장하고 있으므로 톰캣 서버 설치 없이 편리하게 서블릿 코드를 실행할 수 있다.
main클래스에 @ServletComponentScan을 붙이면 패키지를 기준으로 서블릿을 자동등록해준다.
HttpServlet클래스를 상속받고 service메소드를 재정의해줘야한다.
@WebServlet(name = "helloServlet", urlPatterns = "/hello")
public class HelloServlet extends HttpServlet {
@Override
protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
System.out.println("HelloServlet.service");
}
}
urlPatterns으로 요청을 하면 이 서블릿이 실행이 되는 것이다.
WAS들이 서블릿 평균 스펙을 구현해준다.
요청은 request로 읽고 응답은 response로하면된다.
파라미터에서 요청을 받고 text/plain로 응답하고 utf-8인코딩해서 보내보자.
@WebServlet(name = "helloServlet", urlPatterns = "/hello")
public class HelloServlet extends HttpServlet {
@Override
protected void service(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
String username = request.getParameter("username");
System.out.println("username: " + username);
response.setContentType("text/plain");
response.setCharacterEncoding("utf-8");
response.getWriter().write("hello " + username);
}
}
HTTP 요청을 통해 매핑된 URL이 호출되면 서블릿 컨테이너가 서비스 메소드를 요청해서 값을 보여주게 된다.
application.properties에 다음을 추가하면 헤더정보를 읽을 수 있다.
logging.level.org.apache.coyote.http11=debug
그러나 계속 넣고 돌리면 운영서버의 성능저하가 발생할 수 있으니 개발단계에서만 적용하는게 좋다.
스프링부트를 실행하면 부트가 내장톰캣서버를띄워준다.
서블릿스캔을 붙여놓으면 서블릿을 넣어주고
HTTP요청메세지를 기반으로 request객체를 생성하고 response 객체 정보로 HTTP응답을 생성하게 된다.
Content-Length와 같은 부가정보는 웹 애플리케이션 서버가 자동으로 생성해준다
webapp폴더에 index.html을 만들면 웰컴페이지로 기본설정해서 띄워준다.
강의에서 길을 잃지 않도록 내용들이 적혀있다.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<ul>
<li>
hello 서블릿
<ul>
<li>
<a href="/hello?username=servlet">hello 서블릿 호출</a>
</li>
</ul>
</li>
<li>
HttpServletRequest
<ul>
<li>
<a href="/request-header">기본 사용법, Header 조회</a>
</li>
<li>
HTTP 요청 메시지 바디 조회
<ul>
<li>
<a href="/request-param?username=hello&age=20">GET - 쿼리 파라미터</a>
</li>
<li>
<a href="/basic/hello-form.html">POST - HTML Form</a>
</ li>
<li>HTTP API - MessageBody -> Postman 테스트</li>
</ul>
</li>
</ul>
</li>
<li>
HttpServletResponse
<ul>
<li>
<a href="/response-header">기본 사용법, Header 조회</a>
</li>
<li>
HTTP 응답 메시지 바디 조회
<ul>
<li>
<a href="/response-html">HTML 응답</a>
</li>
<li>
<a href="/response-json">HTTP API JSON 응답</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</body>
</html>
9. HttpServletRequest - 개요
HttpServletRequest 역할
HTTP 요청 메시지를 개발자가 직접 파싱해서 사용해도 되지만 매우 불편할 것이다.
서블릿은 개발자가 HTTP 요청 메시지를 편리하게 사용할 수 있도록 개발자 대신에 HTTP 요청 메시지를 파싱한다.
그리고 그 결과를 HttpServletRequest 객체에 담아서 제공한다.
HttpServletRequest를 사용하면 다음과 같은 HTTP 요청 메시지를 편리하게 조회할 수 있다
POST /save HTTP/1.1
Host: localhost:8080
Content-Type: application/x-www-form-urlencoded
username=kim&age=20
post요청 html폼 username age파라미터가 있다.
START LINE
HTTP 메소드
URL
쿼리 스트링
스키마, 프로토콜
헤더
헤더 조회
바디
form 파라미터 형식 조회
message body 데이터 직접 조회
HttpServletRequest 객체는 추가로 여러가지 부가기능도 함께 제공한다.
임시 저장소 기능
해당 HTTP 요청이 시작부터 끝날 때 까지 유지되는 임시 저장소 기능을 제공한다.
저장: request.setAttribute(name, value)
조회: request.getAttribute(name)
세션 관리 기능
request.getSession(create: true)
HttpServletRequest HttpServletResponse를 사용할 때 가장 중요한 점은
이 객체들이 HTTP 요청 메시지, HTTP 응답 메시지를 편리하게 사용하도록 도와주는 객체라는 점이다.
따라서 이 기능에 대해서 깊이있는 이해를 하려면 HTTP 스펙이 제공하는 요청, 응답 메시지 자체를 이해해야 한다
10. HttpServletRequest - 기본 사용법
protected된 서비스를 꼭만들어줘야한다.
10.1 StartLine
먼저 StartLine을 출력해보자.
메소드 프로토콜 등등의 정보가 들어있다.
private void printStartLine(HttpServletRequest request) {
System.out.println("--- REQUEST-LINE - start ---");
System.out.println("request.getMethod() = " + request.getMethod()); // GET
System.out.println("request.getProtocol() = " + request.getProtocol()); // HTTP/1.1
System.out.println("request.getScheme() = " + request.getScheme()); // http
// http://localhost:8080/request-header
System.out.println("request.getRequestURL() = " + request.getRequestURL());
// /request-header
System.out.println("request.getRequestURI() = " + request.getRequestURI());
// username=hi
System.out.println("request.getQueryString() = " +
request.getQueryString());
System.out.println("request.isSecure() = " + request.isSecure()); // https 사용 유무
System.out.println("--- REQUEST-LINE - end ---");
System.out.println();
}
request.getMethod() = GET
request.getProtocol() = HTTP/1.1
request.getScheme() = http
request.getRequestURL() = http://localhost:8080/request-header
request.getRequestURI() = /request-header
request.getQueryString() = null
request.isSecure() = false
10.2 헤더 정보
옛날 방식으로는 request.getHeaderNames으로 헤더 정보를 얻어올 수 있다.
while로 hasMoreElements()정보가 있느지 물어봐서 출력할 수 있다.ㅁ
더 좋은 방법으로는 반복자를 얻어 스트림으로 출력할 수 도 있다.
여러 헤더 정보를 얻을 수 있다.
// Header 모든 정보
private void printHeaders(HttpServletRequest request) {
System.out.println("--- Headers - start ---");
/*
Enumeration<String> headerNames = request.getHeaderNames();
while (headerNames.hasMoreElements()) {
String headerName = headerNames.nextElement();
System.out.println(headerName + ": " + request.getHeader(headerName));
}
*/
request.getHeaderNames().asIterator()
.forEachRemaining(headerName -> System.out.println(headerName + ": " + request.getHeader(headerName)));
System.out.println("--- Headers - end ---");
System.out.println();
}
host: localhost:8080
connection: keep-alive
cache-control: max-age=0
sec-ch-ua: "Chromium";v="88", "Google Chrome";v="88", ";Not A Brand";v="99"
sec-ch-ua-mobile: ?0
upgrade-insecure-requests: 1
user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 11_2_0) AppleWebKit/537.36
(KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36
accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/
webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
sec-fetch-site: none
sec-fetch-mode: navigate
sec-fetch-user: ?1
sec-fetch-dest: document
accept-encoding: gzip, deflate, br
accept-language: ko,en-US;q=0.9,en;q=0.8,ko-KR;q=0.7
10.3 Header 편리한 조회
getServerName메소드로 서버 ip
request.getLocales()메소드로 locales 정보를 다 출력할수도 있다.
여러가지 기능이 있다.
// Header 편리한 조회
private void printHeaderUtils(HttpServletRequest request) {
System.out.println("--- Header 편의 조회 start ---");
System.out.println("[Host 편의 조회]");
System.out.println("request.getServerName() = " +
request.getServerName()); // Host 헤더
System.out.println("request.getServerPort() = " +
request.getServerPort()); // Host 헤더
System.out.println();
System.out.println("[Accept-Language 편의 조회]");
request.getLocales().asIterator()
.forEachRemaining(locale -> System.out.println("locale = " +
locale));
System.out.println("request.getLocale() = " + request.getLocale());
System.out.println();
System.out.println("[cookie 편의 조회]");
if (request.getCookies() != null) {
for (Cookie cookie : request.getCookies()) {
System.out.println(cookie.getName() + ": " + cookie.getValue());
}
}
System.out.println();
System.out.println("[Content 편의 조회]");
System.out.println("request.getContentType() = " +
request.getContentType());
System.out.println("request.getContentLength() = " +
request.getContentLength());
System.out.println("request.getCharacterEncoding() = " +
request.getCharacterEncoding());
System.out.println("--- Header 편의 조회 end ---");
System.out.println();
}
request.getServerName() = localhost
request.getServerPort() = 8080
[Accept-Language 편의 조회]
locale = ko
locale = en_US
locale = en
locale = ko_KR
request.getLocale() = ko
[cookie 편의 조회]
[Content 편의 조회]
request.getContentType() = null
request.getContentLength() = -1
request.getCharacterEncoding() = UTF-8
get방식이라 request.getContentType이 null인데 이를 해보고싶으면
포스트맨을 사용하면된다. 포스트맨을 사용하면 body에 포스트요청을 담아서 보내준다.
10.4 기타정보
로컬정보 remote정보 등을 얻을 수 있다.
//기타 정보
private void printEtc(HttpServletRequest request) {
System.out.println("--- 기타 조회 start ---");
System.out.println("[Remote 정보]");
System.out.println("request.getRemoteHost() = " +
request.getRemoteHost()); //
System.out.println("request.getRemoteAddr() = " +
request.getRemoteAddr()); //
System.out.println("request.getRemotePort() = " +
request.getRemotePort()); //
System.out.println();
System.out.println("[Local 정보]");
System.out.println("request.getLocalName() = " +
request.getLocalName()); //
System.out.println("request.getLocalAddr() = " +
request.getLocalAddr()); //
System.out.println("request.getLocalPort() = " +
request.getLocalPort()); //
System.out.println("--- 기타 조회 end ---");
System.out.println();
}
[Remote 정보]
request.getRemoteHost() = 0:0:0:0:0:0:0:1
request.getRemoteAddr() = 0:0:0:0:0:0:0:1
request.getRemotePort() = 54305
[Local 정보]
request.getLocalName() = localhost
request.getLocalAddr() = 0:0:0:0:0:0:0:1
request.getLocalPort() = 8080
11. HTTP 요청 데이터 - 개요
헤더정보나 스타트라인을 조회했는데 실제 필요한 데이터를 조회하는 방법은 받지 않았다.
실제로 요청메세지를 통해서 클라이언트에서 서버로 데이터를 전달하는 방법을 알아보자.
주로 다음 3가지 방법을 사용한다.
11.1 GET - 쿼리 파라미터
/url?username=hello&age=20
메시지 바디 없이, URL의 쿼리 파라미터에 데이터를 포함해서 전달한다.
예) 검색, 필터, 페이징등에서 많이 사용하는 방식이다.
11.2 POST - HTML Form
content-type: application/x-www-form-urlencoded
메시지 바디에 쿼리 파리미터 형식으로 전달한다. username=hello&age=20
예) 회원 가입, 상품 주문, HTML Form 사용한다.
HTTP message body에 데이터를 직접 담아서 요청한다.
11.3 HTTP API에서 주로 사용, JSON, XML, TEXT
데이터 형식은 주로 JSON 사용한다. 요즘에 주로 사용한다.
POST, PUT, PATCH
이 세가지안에 다 들어있다.
12. HTTP 요청 데이터 - GET 쿼리 파라미터
다음 데이터를 클라이언트에서 서버로 전송해보자.
전달 데이터
username=hello
age=20
메시지 바디 없이, URL의 쿼리 파라미터를 사용해서 데이터를 전달하자.
예) 검색, 필터, 페이징등에서 많이 사용하는 방식
쿼리 파라미터는 URL에 다음과 같이 ? 를 시작으로 보낼 수 있다.
추가 파라미터는 & 로 구분하면 된다.
http://localhost:8080/request-param?username=hello&age=20
서버에서는 HttpServletRequest가 제공하는 다음 메소드를 통해 쿼리 파라미터를 편리하게 조회할 수 있다.
쿼리 파라미터 조회 메소드
단일 파라미터 조회
String username = request.getParameter("username");
파라미터 이름들 모두조회
Enumeration<String> parameterNames = request.getParameterNames();
파라미터를 Map 으로 조회
Map<String, String[]> parameterMap = request.getParameterMap();
복수 파라미터 조회
String[] usernames = request.getParameterValues("username");
username=hello&username=kim 과 같이 파라미터 이름은 하나인데 값이 여러개인 경우는 배열로 값을 받아올 수 있다.
request.getParameter() 는 하나의 파라미터 이름에 대해서 단 하나의 값만 있을 때 사용해야 한다.
중복일 때는 request.getParameterValues() 를 사용해야 한다.
이렇게 중복일 때 request.getParameter()를 사용하면 request.getParameterValues()의 첫 번째 값을 반환한다
대부분 단일로 보내지 중복으로 보내는 일은 없다.
@WebServlet(name = "requestParamServlet", urlPatterns = "/request-param")
public class RequestParamServlet extends HttpServlet {
@Override
protected void service(HttpServletRequest request, HttpServletResponse resp) throws ServletException, IOException {
System.out.println("[전체 파라미터 조회] - start");
request.getParameterNames().asIterator()
.forEachRemaining(paramName -> System.out.println(paramName +
"=" + request.getParameter(paramName)));
System.out.println("[전체 파라미터 조회] - end");
System.out.println();
System.out.println("[단일 파라미터 조회]");
String username = request.getParameter("username");
System.out.println("request.getParameter(username) = " + username);
String age = request.getParameter("age");
System.out.println("request.getParameter(age) = " + age);
System.out.println();
System.out.println("[이름이 같은 복수 파라미터 조회]");
System.out.println("request.getParameterValues(username)");
String[] usernames = request.getParameterValues("username");
for (String name : usernames) {
System.out.println("username=" + name);
}
resp.getWriter().write("ok");
}
}
13. HTTP 요청 데이터 - POST HTML Form
HTML의 Form을 사용해서 클라이언트에서 서버로 데이터를 전송해보자.
주로 회원 가입, 상품 주문 등에서 사용하는 방식이다.
특징
content-type: application/x-www-form-urlencoded
메시지 바디에 쿼리 파리미터 형식으로 데이터를 전달한다. username=hello&age=20
application/x-www-form-urlencoded 형식은 앞서 GET에서 살펴본 쿼리 파라미터 형식과 같다.
따라서 쿼리 파라미터 조회 메소드를 그대로 사용하면 된다.
클라이언트(웹 브라우저) 입장에서는 두 방식에 차이가 있지만 서버 입장에서는 둘의 형식이 동일하므로 request.getParameter() 로 편리하게 구분없이 조회할 수 있다.
request.getParameter()는 GET URL 쿼리 파라미터 형식도 지원하고 POST HTML Form 형식도 둘 다 지원한다.
참고
content-type은 HTTP 메시지 바디의 데이터 형식을 지정한다.
GET URL 쿼리 파라미터 형식으로 클라이언트에서 서버로 데이터를 전달할 때는 HTTP 메시지 바디를 사용하지 않기 때문에 content-type이 없다.
POST HTML Form 형식으로 데이터를 전달하면 HTTP 메시지 바디에 해당 데이터를 포함해서 보내기 때문에 바디에 포함된 데이터가 어떤 형식인지 content-type을 꼭 지정해야 한다.
이렇게 폼으로 데이터를 전송하는 형식을 application/x-www-form-urlencoded 라 한다.
이런 간단한 테스트에서 HTML폼을 맏드는 것이 귀찮으면 포스트맨을 사용할 수 있다.
14. HTTP 요청 데이터 - API 메시지 바디 - 단순 텍스트
HTTP message body에 데이터를 직접 담아서 요청하는방법이다.
HTTP API에서 주로 사용, JSON, XML, TEXT이고 데이터 형식은 주로 JSON 사용한다.
요즘엔 대부분 json으로 보내고 xml은 과거의 방식이다.
POST, PUT, PATCH
먼저 가장 단순한 텍스트 메시지를 HTTP 메시지 바디에 담아서 전송하고읽어보자.
HTTP 메시지 바디의 데이터를 InputStream을 사용해서 직접 읽을 수 있다.
@WebServlet(name = "requestBodyStringServlet", urlPatterns = "/request-bodystring")
public class RequestBodyStringServlet extends HttpServlet {
@Override
protected void service(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
ServletInputStream inputStream = request.getInputStream();
String messageBody = StreamUtils.copyToString(inputStream,
StandardCharsets.UTF_8);
System.out.println("messageBody = " + messageBody);
response.getWriter().write("ok");
}
}
inputStream은 byte 코드를 반환한다.
byte 코드를 우리가 읽을 수 있는 문자(String)로 보려면 문자표(Charset)를 지정해주어야 한다.
여기서는 UTF_8 Charset을 지정해주었다.
포스트맨에서 POST방식으로 body에 raw 로 텍스트를 지정해서 보내면된다.
15. HTTP 요청 데이터 - API 메시지 바디 - JSON
요즘엔 문자로 주고받지 않고 JSON으로 주고받게 된다.
JSON형식을 하기 위해서는 파싱할 수 있도록 객체가 필요하다.
JOSN라이브러리가 알아서 요청하도록 getter 와 setter가 필요하다.
@Getter
@Setter
public class HelloData {
private String username;
private int age;
}
@WebServlet(name = "requestBodyJsonServlet", urlPatterns = "/request-bodyjson")
public class RequestBodyJsonServlet extends HttpServlet {
private ObjectMapper objectMapper = new ObjectMapper();
@Override
protected void service(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
ServletInputStream inputStream = request.getInputStream();
String messageBody = StreamUtils.copyToString(inputStream,
StandardCharsets.UTF_8);
System.out.println("messageBody = " + messageBody);
HelloData helloData = objectMapper.readValue(messageBody,
HelloData.class);
System.out.println("helloData.username = " + helloData.getUsername());
System.out.println("helloData.age = " + helloData.getAge());
response.getWriter().write("ok");
}
}
포스트맨으로 다음과 같은 요청을 해보자.
raw에서 JSON으로 변경하면된다.
POST http://localhost:8080/request-body-json
content-type: application/json
message body: {"username": "hello", "age": 20}
특별한 형식이 아니라 json형태의 문자로 들어오게 된다.
//출력 결과
messageBody = {"username": "hello", "age": 20}
helloData.username = hello
helloData.age = 20
JSON 결과를 파싱해서 사용할 수 있는 자바 객체로 변환하려면
Jackson, Gson 같은 JSON 변환 라이브러리를 추가해서 사용해야 한다.
스프링 부트로 Spring MVC를 선택하면 기본으로 Jackson 라이브러리( ObjectMapper )를 함께 제공한다.
참고
HTML form 데이터도 메시지 바디를 통해 전송되므로 직접 읽을 수 있다.
하지만 편리한 파리미터 조회기능(request.getParameter())을 이미 제공하기 때문에 파라미터 조회 기능을 사용하면 된다.
15. HttpServletResponse - 기본 사용법
요청을 했으니 응답을 알아보도록 하자.
HTTP 응답 메시지 생성
-HTTP 응답코드 지정
-헤더 생성
-바디 생성
편의 기능 제공
Content-Type, 쿠키, Redirect을 지정할 수 있다.
15.1 status-line
응답 상태에 대해서 설정할 수 있다.
response.setStatus(HttpServletResponse.SC_OK); // 200
15.2 response-headers
헤더를 설정할 수도 있고 임의의 헤더를 만들 수도 있다.
response.setHeader("Content-Type", "text/plain;charset=utf-8");
response.setHeader("Cache-Control", "no-cache, no-store, mustrevalidate");
response.setHeader("Pragma", "no-cache");
response.setHeader("my-header", "hello");
15.3 content 타입
다음 메소드로 contentType을 설정할 수 있다.
response.setContentType("text/plain");
response.setCharacterEncoding("utf-8");
15.4 쿠키
쿠키 객체를 만들어서 쿠키의 메소드를 직접 사용할 수 있다.
myCookie=good; Max-Age=600;파라미터로 보내는 것을 메소드로 쉽게 정의할 수 있다.
Cookie cookie = new Cookie("myCookie", "good");
cookie.setMaxAge(600); // 600초
response.addCookie(cookie);
15.5 redirect
Status Code 302 Location: /basic/hello-form.html으로 설정해서 보내고 싶다.
setStatus()메소드로 요청코드를 setHeader()메소드로 위치를 각각 지정할수도 있지만
sendRedirect()메소드로 리다이렉트로 편리하게 사용할 수 있다.
response.sendRedirect("/basic/hello-form.html");
16. HTTP 응답 데이터 - 단순 텍스트, HTML
응답데이터를 집중해서 알아보자.
이것도 세가지로 분류할 수 있다.
단순 텍스트 응답 - 앞에서 살펴봄 (writer.println("ok");)
HTML 응답
HTTP API - MessageBody JSON 응답
먼저 HTML응답을 알아보고자한다.
HTTP 응답으로 HTML을 반환할 때는 content-type을 text/html 로 지정해야 한다
@WebServlet(name = "responseHtmlServlet", urlPatterns = "/response-html")
public class ResponseHtmlServlet extends HttpServlet {
@Override
protected void service(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
// Content-Type: text/html;charset=utf-8
response.setContentType("text/html");
response.setCharacterEncoding("utf-8");
PrintWriter writer = response.getWriter();
writer.println("<html>");
writer.println("<body>");
writer.println(" <div>안녕?</div>");
writer.println("</body>");
writer.println("</html>");
}
}
17. HTTP 응답 데이터 - API JSON
HTTP 응답으로 JSON을 반환할 때는 content-type을 application/json 로 지정해야 한다.
Jackson 라이브러리가 제공하는 objectMapper.writeValueAsString()를 사용하면 객체를 JSON 문자로 변경할 수 있다
@WebServlet(name = "responseJsonServlet", urlPatterns = "/response-json")
public class ResponseJsonServlet extends HttpServlet {
private ObjectMapper objectMapper = new ObjectMapper();
@Override
protected void service(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
// Content-Type: application/json
response.setHeader("content-type", "application/json");
response.setCharacterEncoding("utf-8");
HelloData data = new HelloData();
data.setUsername("kim");
data.setAge(20);
// {"username":"kim","age":20}
String result = objectMapper.writeValueAsString(data);
response.getWriter().write(result);
}
}
참고할점
application/json 은 스펙상 utf-8 형식을 사용하도록 정의되어 있다.
그래서 스펙에서 charset=utf-8 과 같은 추가 파라미터를 지원하지 않는다.
따라서 application/json 이라고만 사용해야지 application/json;charset=utf-8 이라고 전달하는 것은 의미 없는 파라미터를 추가한 것이 된다.
response.getWriter()를 사용하면 추가 파라미터를 자동으로 추가해버린다.
이때는 response.getOutputStream()으로 출력하면 그런 문제가 없다.
스프링으로 가면 return만으로 json을 뿌려줄 수 있다.
2023.05.29
공부할때 항상만드는 것이 form이고 대부분 이방식으로 데이터를 전달하였다.
매핑의 경우에서 get과post만 사용했는데 다양한 매핑방식을 알게 되었다.
HTTP API를 전달하는 방식을 아직까지는 AJAX로 보내는 방식밖에 모르는데 앞으로 다양한 방식이 있을 수 있을 것이다.
백엔드 영역에서는 이 값을 잘받아 처리하는 방법을 잘 이해하는게 중요해 보인다.
'기초단계 > SPRING' 카테고리의 다른 글
| 2023.06.01 Spring (0) | 2023.06.06 |
|---|---|
| 2023.05.30 Spring (0) | 2023.05.31 |
| 2023.05.27 Spring (0) | 2023.05.31 |
| 2023.05.25 Spring (0) | 2023.05.31 |
| 2023.05.24 Spring (0) | 2023.05.24 |