class ResponseMessageWrapperAdvice implements ResponseBodyAdvice<Object> {
    @Setter
    @Getter
    private Set<String> excludes = new HashSet<>();

    @Override
    public boolean supports(@Nonnull MethodParameter methodParameter, @Nonnull Class<? extends HttpMessageConverter<?>> aClass) {<FILL_FUNCTION_BODY>}

    @Override
    public Object beforeBodyWrite(Object body,
                                  @Nonnull MethodParameter returnType,
                                  @Nonnull MediaType selectedContentType,
                                  @Nonnull Class<? extends HttpMessageConverter<?>> selectedConverterType,
                                  @Nonnull ServerHttpRequest request,
                                  @Nonnull ServerHttpResponse response) {
        if (body instanceof Mono) {
            return ((Mono<?>) body)
                    .map(ResponseMessage::ok)
                    .switchIfEmpty(Mono.fromSupplier(ResponseMessage::ok));
        }
        if (body instanceof Flux) {
            return ((Flux<?>) body)
                    .collectList()
                    .map(ResponseMessage::ok)
                    .switchIfEmpty(Mono.fromSupplier(ResponseMessage::ok));
        }

        Method method = returnType.getMethod();

        if (method != null && returnType.getMethod().getReturnType() == String.class) {
            return JSON.toJSONString(ResponseMessage.ok(body));
        }

        return ResponseMessage.ok(body);
    }


}


        if (methodParameter.getMethod() == null) {
            return true;
        }

        RequestMapping mapping = methodParameter.getMethodAnnotation(RequestMapping.class);
        if (mapping == null) {
            return false;
        }
        for (String produce : mapping.produces()) {
            MimeType mimeType = MimeType.valueOf(produce);
            if (MediaType.TEXT_EVENT_STREAM.includes(mimeType) ||
                    MediaType.APPLICATION_STREAM_JSON.includes(mimeType)) {
                return false;
            }
        }

        if (!CollectionUtils.isEmpty(excludes) && methodParameter.getMethod() != null) {

            String typeName = methodParameter.getMethod().getDeclaringClass().getName() + "." + methodParameter
                    .getMethod()
                    .getName();
            for (String exclude : excludes) {
                if (typeName.startsWith(exclude)) {
                    return false;
                }
            }
        }

        Class<?> returnType = methodParameter.getMethod().getReturnType();

        boolean isStream = Publisher.class.isAssignableFrom(returnType);
        if (isStream) {
            ResolvableType type = ResolvableType.forMethodParameter(methodParameter);
            returnType = type.resolveGeneric(0);
        }
        boolean isAlreadyResponse = returnType == ResponseMessage.class || returnType == ResponseEntity.class;

        return !isAlreadyResponse;
    
<no_super_class>