code: public static void clearGrailsWebRequest() {
          RequestAttributes reqAttrs = RequestContextHolder.getRequestAttributes();
          if (reqAttrs != null) {
              // First remove the web request from the HTTP request attributes.
              GrailsWebRequest webRequest = (GrailsWebRequest) reqAttrs;
              webRequest.getRequest().removeAttribute(GrailsApplicationAttributes.WEB_REQUEST);
  
              // Now remove it from RequestContextHolder.
              RequestContextHolder.resetRequestAttributes();
          }
      }
docs: Removes any GrailsWebRequest instance from the current request.