Tag:Class meeting

  • Method of adding interceptor in springboot


    Create interceptor Create a class to implement the handleinterceptor interface (or inherit the abstract class that implements the interface), and implement the prehandle, posthandle and aftercompletion methods. public class MyInterceptor implements HandlerInterceptor { @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { return true; } @Override public void postHandle(HttpServletRequest request, HttpServletResponse response, […]