-
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 구현하기 - 1단계] 땡칠(박성철) 미션 제출합니다. #377
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.
안녕하세요 땡칠! 떙칠의 코드를 리뷰할 수 있어서 영광이에요 😃
1단계의 요구사항은 충분히 만족한 것 같아 바로 Approve&Merge 할게요.
질문과 사소한 리뷰를 남겨두었으니 답변 부탁드립니다.
리뷰하면서 진짜 많이 배웠어요. 감사합니다 👍
...webmvc/org/springframework/web/servlet/mvc/reflection/ReflectiveHandlerExecutionAdapter.java
Show resolved
Hide resolved
|
||
public class AnnotationHandlerMapping { | ||
|
||
private static final Logger log = LoggerFactory.getLogger(AnnotationHandlerMapping.class); | ||
|
||
private final Object[] basePackage; | ||
private final Object[] basePackages; |
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.
�그런데 basePackages가 String배열이 아닌, Object 배열인 이유가 무얼까요? 🧐
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/src/main/java/webmvc/org/springframework/web/servlet/mvc/tobe/AnnotationHandlerMapping.java
Show resolved
Hide resolved
mvc/src/main/java/webmvc/org/springframework/web/servlet/mvc/tobe/AnnotationHandlerMapping.java
Show resolved
Hide resolved
return getInstanceOf(declaringClass); | ||
} | ||
|
||
private Object safeInstantiate(Class<?> clazz) { |
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.
감사합니다 ㅎㅎ
도기도 한 네이밍 하지 않나요
try { | ||
return clazz.getDeclaredConstructor().newInstance(); | ||
} catch (NoSuchMethodException exception) { | ||
throw new IllegalArgumentException("Class " + clazz.getSimpleName() + "에 기본 생성자가 없습니다"); | ||
} catch (ReflectiveOperationException exception) { | ||
throw new IllegalStateException("Class " + clazz.getSimpleName() + "초기화에 실패했습니다"); | ||
} |
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 class PrintTestUtil { | ||
|
||
public static AbstractStringAssert<?> assertThatOutputOf(IgnoringExceptionRunnable runnable) { |
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.
ㅋㅋㅋㅋ
} | ||
|
||
@Test | ||
void getFields는_자식에서_선언된_필드도_가져온다() { |
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.
자식에서 선언된 필드가 무엇인가요? 테스트에서는 단일 Student 객체일 뿐인 것 같아서요~
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.
도기 리뷰 너무 감사합니다. 다음 단계에서 뵙겠습니다!
|
||
public class AnnotationHandlerMapping { | ||
|
||
private static final Logger log = LoggerFactory.getLogger(AnnotationHandlerMapping.class); | ||
|
||
private final Object[] basePackage; | ||
private final Object[] basePackages; |
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/src/main/java/webmvc/org/springframework/web/servlet/mvc/tobe/AnnotationHandlerMapping.java
Show resolved
Hide resolved
mvc/src/main/java/webmvc/org/springframework/web/servlet/mvc/tobe/AnnotationHandlerMapping.java
Show resolved
Hide resolved
return getInstanceOf(declaringClass); | ||
} | ||
|
||
private Object safeInstantiate(Class<?> clazz) { |
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 class PrintTestUtil { | ||
|
||
public static AbstractStringAssert<?> assertThatOutputOf(IgnoringExceptionRunnable runnable) { |
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.
ㅋㅋㅋㅋ
} | ||
|
||
@Test | ||
void getFields는_자식에서_선언된_필드도_가져온다() { |
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.
안녕하세요 도기 ✋🏻 반갑습니다
리플렉션을 직접 써보는 것은 처음이라 학습 테스트를 추가로 작성해보았습니다.
그 외엔 간단해서 특이사항은 없었습니다. 리뷰 잘부탁드려요!!