-
Notifications
You must be signed in to change notification settings - Fork 304
[MVC 구현하기 - 3단계] 베베(최원용) 미션 제출합니다 #617
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file was deleted.
Oops, something went wrong.
44 changes: 0 additions & 44 deletions
44
app/src/main/java/com/techcourse/controller/lagacy/LoginController.java
This file was deleted.
Oops, something went wrong.
22 changes: 0 additions & 22 deletions
22
app/src/main/java/com/techcourse/controller/lagacy/LoginViewController.java
This file was deleted.
Oops, something went wrong.
15 changes: 0 additions & 15 deletions
15
app/src/main/java/com/techcourse/controller/lagacy/LogoutController.java
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
app/src/main/java/com/techcourse/controller/lagacy/RegisterController.java
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
app/src/main/java/com/techcourse/controller/lagacy/RegisterViewController.java
This file was deleted.
Oops, something went wrong.
22 changes: 0 additions & 22 deletions
22
app/src/main/java/com/techcourse/controller/lagacy/UserSession.java
This file was deleted.
Oops, something went wrong.
34 changes: 34 additions & 0 deletions
34
app/src/main/java/com/techcourse/controller/mvc/MvcUserController.java
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package com.techcourse.controller.mvc; | ||
|
||
import com.techcourse.domain.User; | ||
import com.techcourse.repository.InMemoryUserRepository; | ||
import context.org.springframework.stereotype.Controller; | ||
import jakarta.servlet.http.HttpServletRequest; | ||
import jakarta.servlet.http.HttpServletResponse; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
import web.org.springframework.web.bind.annotation.RequestMapping; | ||
import web.org.springframework.web.bind.annotation.RequestMethod; | ||
import webmvc.org.springframework.web.servlet.ModelAndView; | ||
import webmvc.org.springframework.web.servlet.view.JsonView; | ||
|
||
import java.util.NoSuchElementException; | ||
|
||
@Controller | ||
public class MvcUserController { | ||
|
||
private static final Logger log = LoggerFactory.getLogger(MvcUserController.class); | ||
|
||
@RequestMapping(value = "/api/user", method = RequestMethod.GET) | ||
public ModelAndView show(HttpServletRequest request, HttpServletResponse response) { | ||
String account = request.getParameter("account"); | ||
log.debug("user id : {}", account); | ||
User user = InMemoryUserRepository.findByAccount(account) | ||
.orElseThrow(() -> new NoSuchElementException("user not found!")); | ||
|
||
ModelAndView modelAndView = new ModelAndView(new JsonView()); | ||
modelAndView.addObject("user", user); | ||
return modelAndView; | ||
} | ||
|
||
} |
This file contains hidden or 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
2 changes: 1 addition & 1 deletion
2
...urse/support/handler/HandlerAdapters.java → .../web/support/handler/HandlerAdapters.java
This file contains hidden or 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
3 changes: 1 addition & 2 deletions
3
...ourse/support/handler/HandlerMappers.java → ...k/web/support/handler/HandlerMappers.java
This file contains hidden or 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
2 changes: 1 addition & 1 deletion
2
...t/web/filter/CharacterEncodingFilter.java → ...t/web/filter/CharacterEncodingFilter.java
This file contains hidden or 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
2 changes: 1 addition & 1 deletion
2
...se/support/web/filter/ResourceFilter.java → ...eb/support/web/filter/ResourceFilter.java
This file contains hidden or 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
20 changes: 0 additions & 20 deletions
20
mvc/src/main/java/webmvc/org/springframework/web/servlet/mvc/asis/ForwardController.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
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.
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.
혹시 레거시 코드를 제거할 때 이부분도 제거되어야 하는지 궁금합니다!
예를들어 제거 대상으로 webmvc.org.springframework.web.servlet.mvc.asis에 유지되어 있는 클래스들이 있겠네요.
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.
요구사항에서 Legacy 코드를 모두 제거해라고 하여서 제거 했는데, 원래 사용하던 LegacyHandlerMapper를 사용하지 않게 되면서 삭제했습니다!