Skip to content

Commit

Permalink
feat: HandlerExecution 재정의
Browse files Browse the repository at this point in the history
  • Loading branch information
BGuga committed Sep 13, 2023
1 parent c2b6eab commit d9ef3a5
Showing 1 changed file with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,21 @@

import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.lang.reflect.Method;
import webmvc.org.springframework.web.servlet.ModelAndView;

public class HandlerExecution {

public ModelAndView handle(final HttpServletRequest request, final HttpServletResponse response) throws Exception {
return null;
private final Object handler;
private final Method handlerMethod;

public HandlerExecution(Object handler, Method handlerMethod) {
this.handler = handler;
this.handlerMethod = handlerMethod;
}

public ModelAndView handle(HttpServletRequest request,
HttpServletResponse response) throws Exception {
return (ModelAndView) handlerMethod.invoke(handler, request, response);
}
}

0 comments on commit d9ef3a5

Please sign in to comment.