-
Notifications
You must be signed in to change notification settings - Fork 1
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
[Feature] 파일 S3 업로드 추가, 필터에서 Multipart 데이터를 받기 위한 ServletRequest Wrapping #64
Conversation
- 요청 dto에서 이미지 경로가 아닌 파일 업로드
- 요청 dto에서 이미지 경로가 아닌 파일 업로드
- ServletRequestMapper의 ServletRequest 구현체(Request.class) 메서드 오버라이딩 - content 파싱하여 로깅
/** | ||
* 일반적인 Json Body를 로깅하기 위해서 Mdc에 저장하는 필터 | ||
*/ | ||
public class RequestMultipartBodyCollectionFilter extends OncePerRequestFilter { | ||
|
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.
감사합니다 반영했습니다
outer: | ||
for (int i=start; i<=data.length-pattern.length; i++) { | ||
for (int j=0; j<pattern.length; j++) { | ||
if (data[i+j] != pattern[j]) | ||
continue outer; | ||
} | ||
return i; | ||
} | ||
return -1; |
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.
와 continue나 break에 라벨을 붙일수도 있군요
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.
goto를 권장하지 않고있어서 저는 이런식으로 하는데, 더 좋은 방법 알고계시면 알려주시면 감사합니다
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.
와 정말 수고하셨습니다. 아주 깔끔한것 같아요. 머지해도 좋을 것 같습니다.
- 주석 추가/수정 - 상수 분리
많이 복잡한 작업이었는데 정말 많이 도와주셔서 훨씬 빠르게 할 수 있었던 것 같습니다. 감사합니다 |
🎯 이슈 번호
Issue #52
💡 작업 내용
💡 자세한 설명
과정
-> 정리해서 추가하겠습니다
-> 주석으로 추가했습니다.
-> json과 multipart 잘 들어가고, 로그 잘 남습니다.
-> s3 업로드 잘 됩니다.
📗 참고 자료
https://coderanch.com/t/781674/open-source/apache-common-FileUpload
https://stackoverflow.com/questions/68478443/converting-multipartfile-to-file
https://commons.apache.org/proper/commons-fileupload/overview.html
https://stackoverflow.com/questions/48255058/how-to-check-if-httpservletrequest-getpart-is-set-or-not
✅ 셀프 체크리스트