You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
섹션2. 스프링 웹 개발 기초
1. 정적 컨텐츠
https://docs.spring.io/spring-boot/docs/2.3.1.RELEASE/reference/html/spring-boot-features.html#boot-features-spring-mvc-static-content
에서 스프링 부트의 정적 컨텐츠 기능을 확인할 수 있다.
웹 브라우저에서 요청이 들어오면 컨트롤러가 있는 지 확인하여
2. MVC와 템플릿 엔진
관심사 분리! 역할과 책임!
MODEL
VIEW
화면을 그리는데 모든 관심을 집중
CONTROLLER
비즈니스 로직과 서버 뒷단의 일
@RequestParam 을 통해 파라미터가 있는 컨트롤러 매핑 실습
컨트롤러에 따라 name으로 파라미터 값을 받아온다.
반대로 name 을 kame 으로 바꿔보면 에러가 뜨는 걸 확인할 수 있다.
3.API
JSON 타입의 객체를 반환하는 것
@responsebody
viewResolver 대신 HttpMessageConvertor가 동작한다.
Beta Was this translation helpful? Give feedback.
All reactions