package com.bofeng.security;

import com.yvan.Model;
import org.springframework.core.MethodParameter;
import org.springframework.web.context.request.NativeWebRequest;
import org.springframework.web.method.support.HandlerMethodReturnValueHandler;
import org.springframework.web.method.support.ModelAndViewContainer;

public class JwtHandlerProcessor implements HandlerMethodReturnValueHandler {

    public JwtHandlerProcessor() {
    }

    @Override
    public boolean supportsReturnType(MethodParameter returnType) {
        return (returnType.getContainingClass() == Model.class);
    }

    @Override
    public void handleReturnValue(Object returnValue, MethodParameter returnType, ModelAndViewContainer mavContainer, NativeWebRequest webRequest) throws Exception {
        System.out.println(returnType);
    }
}
