-
Notifications
You must be signed in to change notification settings - Fork 25
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
4주차 미션 / 서버 3조 정유혁 #30
Open
You-Hyuk
wants to merge
25
commits into
Konkuk-KUIT:main
Choose a base branch
from
You-Hyuk:week4
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jspf 활용
→ ajax 도입
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
미션 진행도(%)
90%
미션 수행 내용
요구사항 2: ModelAndView 객체 구현 완료
-> return this 를 통해 메소드 체이닝 기법 구현 실패
요구사항 3: Controller 리팩토링 완료
주안점
AddAnswerController 에서 마지막에 ModelAndView 객체에 모델을 추가한 이후에 mav를 반환하는 것이 아닌 jsonView를 반환하였는데, 이렇게 코드를 구현 후 QnA에서 답글을 작성할 경우 localhost8080 내용 : error 라는 화면이 나오지만 새로고침시에 답글이 작성된 것을 확인할 수 있었습니다. mav를 반환할 경우 {0}. invalid date, {2}와 같이 model에 전달한 값이 출력되지 않습니다. JsonView에서의 코드 오류인지 AddAnswerController에서의 코드 오류인지 봐주시면 감사하겠습니다 (__)
현재 코드에서 return this를 통해 메소드 체이닝 기법을 구현하지 않고 사용하고 있는데 이를 어떻게 적용해야 하는지, 적용 시 어떠한 메리트가 있는지 알려주시면 좋을 것 같습니다.
코드 중반부터 바로 추가 리팩토링을 추가하여 커밋이 뒤죽박죽 섞여있습니다. 양해 부탁드립니다...
트러블 슈팅
Controller들의 반환값을 ModelAndView로 변환한 이후에 redirect가 수월하게 되지 않아 문제가 있었습니다.
JspView 혹은 다른 클래스에서의 REDIRECT_PREFIX 에서의 문자열과 Controller가 전달하는 문자열을 잘 확인해보면 좋을 것 같습니다.