-
Notifications
You must be signed in to change notification settings - Fork 388
[1 - 2 단계 Tomcat 구현하기] 호티(윤주호) 미션 제출합니다. #563
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
27 commits
Select commit
Hold shift + click to select a range
649a603
test: 학습 테스트 수행
Ho-Tea 8dc6457
feat: GET /index.html 응답하기
Ho-Tea 54b285c
refactor: CSS 지원하기 전 페이지 응답 uri 수정
Ho-Tea 877bdb5
refactor: RequestLine 추출 메서드 분리
Ho-Tea e52df7d
docs: Tomcat 구현하기 1단계 기능 명세 정리
Ho-Tea b7b0e30
feat: CSS 지원하기
Ho-Tea ae46265
feat: Query String 파싱
Ho-Tea 10738d0
refactor: Servlet Container 구성
Ho-Tea 5defcc2
docs: Tomcat 구현하기 2단계 기능 명세 정리
Ho-Tea bdcbc1e
feat: HTTP Status Code 302
Ho-Tea 265bff3
feat: POST 방식으로 회원가입
Ho-Tea cac6364
feat: Cookie에 JSESSIONID 값 저장하기
Ho-Tea d500656
feat: Session 구현하기
Ho-Tea 452b9d1
test: HTTP 활용하기 학습 테스트
Ho-Tea 9606571
fix: remove implementation logback-classic on gradle (#501)
geoje 7806662
fix: add threads min-spare configuration on properties (#502)
geoje a9d964f
Merge branch 'ho-tea' into step1
Ho-Tea 7131bd5
refactor: http 패키지 분리
Ho-Tea 1e92216
refactor: 메서드 분리
Ho-Tea f0ee1e3
refactor: 패키지 분리
Ho-Tea 7472550
refactor: 헤더 추출 로직 가독성 향상 도모
Ho-Tea d81f691
fix: 페이지 요청 시 화면 깨짐 수정
Ho-Tea af465a5
refactor: 불필요한 정적 팩토리 메서드 삭제
Ho-Tea 5d604e2
refactor: 정적 페이지 호출 메서드 분리
Ho-Tea f1f6d6c
fix: 이전 쿠키 삭제 후 재발행 로직 추가
Ho-Tea 3df5686
refactor: 정적 리소스 URL 반환 메서드 분리
Ho-Tea 331ff15
refactor: 중복 로직 메서드 분리
Ho-Tea 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 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: 2 additions & 0 deletions
2
study/src/main/java/cache/com/example/GreetingController.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
14 changes: 14 additions & 0 deletions
14
study/src/main/java/cache/com/example/cachecontrol/CacheControlInterceptor.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,14 @@ | ||
| package cache.com.example.cachecontrol; | ||
|
|
||
| import jakarta.servlet.http.HttpServletRequest; | ||
| import jakarta.servlet.http.HttpServletResponse; | ||
|
|
||
| import org.springframework.web.servlet.HandlerInterceptor; | ||
| import org.springframework.web.servlet.ModelAndView; | ||
|
|
||
| public class CacheControlInterceptor implements HandlerInterceptor { | ||
| @Override | ||
| public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception { | ||
| response.setHeader("Cache-Control", "no-cache, private"); | ||
| } | ||
| } |
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
13 changes: 9 additions & 4 deletions
13
study/src/main/java/cache/com/example/etag/EtagFilterConfiguration.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 |
|---|---|---|
| @@ -1,12 +1,17 @@ | ||
| package cache.com.example.etag; | ||
|
|
||
| import org.springframework.boot.web.servlet.FilterRegistrationBean; | ||
| import org.springframework.context.annotation.Bean; | ||
| import org.springframework.context.annotation.Configuration; | ||
| import org.springframework.web.filter.ShallowEtagHeaderFilter; | ||
|
|
||
| @Configuration | ||
| public class EtagFilterConfiguration { | ||
|
|
||
| // @Bean | ||
| // public FilterRegistrationBean<ShallowEtagHeaderFilter> shallowEtagHeaderFilter() { | ||
| // return null; | ||
| // } | ||
| @Bean | ||
| public FilterRegistrationBean<ShallowEtagHeaderFilter> shallowEtagHeaderFilter() { | ||
| FilterRegistrationBean<ShallowEtagHeaderFilter> filterRegistrationBean = new FilterRegistrationBean<>(new ShallowEtagHeaderFilter()); | ||
| filterRegistrationBean.addUrlPatterns("/etag", "/resources/*"); | ||
| return filterRegistrationBean; | ||
| } | ||
| } |
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 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 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 |
|---|---|---|
|
|
@@ -8,3 +8,6 @@ server: | |
| threads: | ||
| min-spare: 2 | ||
| max: 2 | ||
| compression: | ||
| enabled: true | ||
| min-response-size: 10 | ||
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
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.
이 기능 잘 동작하고 있나요?
로그인 하고 /login 에 GET으로 요청하니 login 페이지가 그대로 보이는 것 같네요 ㅠㅠ
Uh oh!
There was an error while loading. Please reload this page.
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.
페이지 로딩은 ready() 메서드 때문이었군요
메서드를 부를 때 도착해있는 게 없으면 false가 뜨고 if문 안의 로직을 수행시키지 못하는 것으로 이해했는데 맞나요?!