如何在springboot中的ClientHttpRequestInterceptor中使用自动装配注释

时间:2019-12-13 07:28:55

标签: spring spring-boot redis autowired spring-data-redis

我想为@Autowired中的ClientHttpRequestInterceptor使用springboot

public class RequestResponseHandlerInterceptor implements ClientHttpRequestInterceptor {

    @Autowired
    private localService localService;

    @Autowired
    private RedisTemplate<String, String> redisTemplate;

    private static final String AUTHORIZATION = "Authorization";


    @Override
    public ClientHttpResponse intercept(HttpRequest request, byte[] body, ClientHttpRequestExecution execution) throws IOException {
        ClientHttpResponse response = null;
        ------
        ------
        return response;
    }

}

0 个答案:

没有答案
相关问题