Skip to content

Commit

Permalink
fix: MemberHandlerInterceptor의 매핑 url pattern 수정 (#244)
Browse files Browse the repository at this point in the history
  • Loading branch information
hanueleee authored Aug 2, 2023
1 parent 738b449 commit 46b9566
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ public boolean supportsParameter(MethodParameter parameter) {
public Object resolveArgument(MethodParameter parameter, ModelAndViewContainer mavContainer,
NativeWebRequest webRequest, WebDataBinderFactory binderFactory) {
final HttpServletRequest request = webRequest.getNativeRequest(HttpServletRequest.class);
System.out.println("request.getSession().getAttribute(\"member\"))"+ request.getSession().getAttribute("member"));
System.out.println("request.getHeader(\"Cookie\")"+ request.getHeader("Cookie"));
System.out.println("request.getRequestURL().toString()"+request.getRequestURL().toString());

final HttpSession session = Objects.requireNonNull(request).getSession();
final String id = String.valueOf(session.getAttribute("member"));

Expand Down
2 changes: 1 addition & 1 deletion backend/src/main/java/com/funeat/common/WebConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public void addInterceptors(final InterceptorRegistry registry) {
registry.addInterceptor(authHandlerInterceptor)
.addPathPatterns("/api/products/*/reviews/*");
registry.addInterceptor(memberHandlerInterceptor)
.addPathPatterns("/api/members/*");
.addPathPatterns("/api/members");
}

@Override
Expand Down

0 comments on commit 46b9566

Please sign in to comment.