Skip to content
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단계] 푸우(백승준) 미션 제출합니다. #606

Merged
merged 7 commits into from
Sep 25, 2023

Conversation

BGuga
Copy link

@BGuga BGuga commented Sep 25, 2023

안녕하세요 Junho 미션 3 구현하고 리뷰 요청드립니다!!
구현한 내용은 다음과 같습니다.

  1. JspView 클래스를 구현
  2. JsonView 클래스를 구현
  3. Legacy MVC 제거하기

3번 요구사항을 지키는 과정에서 NotFoundController 를 어떻게 처리할지 고민이었네요 🤔
이번에 구현한 방식은 HandlerMapping 에서 Handler 가 없을 경우 예외를 발생시키고,
해당 예외를 처리하는 ExceptionHandler 를 구현하여 처리했습니다.
이 부분을 어떻게 처리하면 좋을지 주노의 의견이 궁금합니다!!

리뷰 감사드립니다 ☺️

Copy link
Member

@Choi-JJunho Choi-JJunho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

푸우 3단계도 잘 진행해주셨네요 😆
예외처리를 위한 ExceptionHandler가 인상깊네요 👍
(아마 인텔리제이 설정 문제로 예상되지만) 상수가 public이 되어버린 것 외에는 특별하게 이야기할 부분이 보이지 않아 Approve & Merge 하겠습니다~
MVC 미션 진행하느라 고생하셨습니다~
다음 미션도 화이팅!

Comment on lines +38 to +50
private class JunHo {

private List<String> names = List.of("junho", "junho2");
private Integer age = 100;

public List<String> getNames() {
return names;
}

public Integer getAge() {
return age;
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😆
근데 왜 100살이죠..? ㅠㅠ

import webmvc.org.springframework.web.servlet.mvc.tobe.exception.HandlerNotFoundException;
import webmvc.org.springframework.web.servlet.view.JspView;

public class ExceptionHandler {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오..!! 예외상황을 위한 Exception Handler 좋네요 👍

Comment on lines +13 to +14
public static final int SINGLE_DATA_RESPONSE = 1;
public static final int NOT_RESPONSE_BODY = 0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 변수가 public인 이유가 있을까요?

@Choi-JJunho Choi-JJunho merged commit 892d3ba into woowacourse:bguga Sep 25, 2023
1 check passed
@BGuga BGuga deleted the step3 branch September 25, 2023 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants