-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MVC 구현] 달리(김동연) 3단계 미션 제출합니다. #628
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
안녕하세요 달리!
코드 잘봤습니다 😎 디엠으로 얘기 나눈 부분만 적용되면 바로 머지할게요!
일단 리퀘스트 체인지 하겠습니다!
return new ModelAndView(new JspView(viewName)); | ||
} | ||
|
||
@RequestMapping(value = "/login", method = RequestMethod.POST) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
메서드로 분리하는거 좋네요 ㅎㅎ
|
||
public HandlerAdaptors() { | ||
this.adaptors = new ArrayList<>(); | ||
adaptors.add(new ManualHandlerAdaptor()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
현재 ManualHandler 는 사용하지 않는 상태인데, Manual 방식을 이용하는 Controller 를 대비해서 add() 하시는 건가요??
저도 ManualHandler 관련 클래스를 삭제할지 말지 고민했었어서 질문드립니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저도 이거 어떻게할까 고민했는데 2단계의 목적이 기존의 레거시 코드를 사용하던 프로그램에서도 돌아갈 수 있게 유지하는 거라면 기존 버전을 사용하는 사람들 위해 남겨두는 것이 맞지 않을까 하여 남겨두었씁니다.
@Override | ||
public void render(final Map<String, ?> model, final HttpServletRequest request, HttpServletResponse response) | ||
throws Exception { | ||
Writer writer = response.getWriter(); | ||
objectMapper.writeValue(writer,model); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
요구사항에 model size 관련한 내용이 있는데 한 번 확인해보시면 좋을 것 같습니다!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import java.util.Map; | ||
import webmvc.org.springframework.web.servlet.View; | ||
|
||
public class JsonView implements View { | ||
|
||
ObjectMapper objectMapper = new ObjectMapper(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
상수화 할 수 있겠네요!
import webmvc.org.springframework.web.servlet.mvc.adaptor.HandlerAdaptors; | ||
import webmvc.org.springframework.web.servlet.mvc.adaptor.HandlerMappings; | ||
|
||
public class DispatcherServlet extends HttpServlet { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
패키지 이동 좋네요 ㅎㅎ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
리뷰 반영 감사합니다!! 달리와 함께한 mvc 미션 즐거웠습니다 ㅎㅎ
mvc 미션 고생하셨어요. jdbc 미션이랑 플젝 화이팅입니다 ~~
안녕하세요! 레오!
리뷰 신청이 늦어서 죄송합니다 ㅠㅠ
잘부탁 드립니다.