-
Notifications
You must be signed in to change notification settings - Fork 302
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단계] 매튜(김재연) 미션 제출합니다. #566
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.
매튜매튜~~~ 미션 고생하셨어요!
훨씬 더 유연한 코드를 이렇게 이쁘게 빼주셔서 재밌게 잘봤습니다 😊
너무 잘하셔서 커멘트 남길게 많지 않네요 👍
커멘트 살짝만 남겼으니 확인부탁드릴게요 매류매류!
@Override | ||
public String getViewName() { | ||
return ""; | ||
public void render( |
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.
텍스트를 전송할 때 OutputStream 대신 PrinterWriter를 사용해보시는거는 어떤가요?
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.
바로 수정하도록 할게요!
@Override | ||
public HandlerExecution getHandler(final HttpServletRequest request) { | ||
public Object getHandler(HttpServletRequest request) { |
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.
HandlerExecution이 아닌 Object를 반환하니 이후에 다른 객체의 타입을 반환해도 처리해줄 수 있네요! 👍👍
AnnotationHandlerMappingTest도 수정해주시면 될 거 같아요!
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 jakarta.servlet.http.HttpServletResponse; | ||
import webmvc.org.springframework.web.servlet.ModelAndView; | ||
|
||
public interface HandlerAdapter { |
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.
HandlerAdapter를 구현해주셨군요!
고생하셨어요 매튜매튜~
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.
매튜매튜~~ JsonView 조금만 수정부탁드립니다!
커멘트 하나 남겼습니다~ 마지막 수정 화이팅 👍👍👍
response.setContentType(MediaType.APPLICATION_JSON_UTF8_VALUE); | ||
String responseBody = objectMapper.writeValueAsString(model); | ||
response.getWriter().write(responseBody); |
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.
알러뷰 헤이나!
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.
매튜매튜매튜매튜매튜~
마지막까지 진짜 고생많으셨어요!
커멘트 하나하나 읽고 적용하시려고 하시는 모습이 너무 감동이었습니다!
미션은 머지할게요! 고생하셨어요!
private String modelToJson(final Map<String, ?> model) throws Exception { | ||
if (model.size() == 1) { | ||
Object next = model.values() | ||
.iterator() | ||
.next(); | ||
return objectMapper.writeValueAsString(next); | ||
} | ||
|
||
return objectMapper.writeValueAsString(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.
굿굿 매튜매튜!!! 다른 미션도 바쁘실텐데 고생하셨어요! 👍✨👍✨👍✨👍✨👍✨
헤이나아아아아~~~!!
2단계 머지하면서 주신 코멘트들도 적용해봤어요!
아쉬운 것은, 힘들게
Adapter
도입했는데Legacy Code
를 지우라는 요구사항이 있더군요..눈물을 머금고 지웠습니다.
그러면서
ManualHandlerAdapter
,ManualHandlerMapping
도 지웠어요! 쓰지 않는 거대한 코드를 남겨 놓는다면 코드를 읽는 사람으로 하여금 혼란을 불러일으킬 수 있을 것 같아서요!이번 리뷰도 잘 부탁드려요 알러뷰 헤이나~! 주말에 리뷰 너무 고마워요~~~❤️