Java 类org.springframework.http.client.AbstractClientHttpRequestFactoryWrapper 实例源码

项目:teamcity-hashicorp-vault-plugin    文件:VaultParametersResolverTest.java   
@Before
public void setUp() throws Exception {
    ClientHttpRequestFactory factory = new AbstractClientHttpRequestFactoryWrapper(createClientHttpRequestFactory()) {
        @Override
        protected ClientHttpRequest createRequest(URI uri, HttpMethod httpMethod, ClientHttpRequestFactory requestFactory) throws IOException {
            myRequestedURIs.add(uri.getPath());
            return requestFactory.createRequest(uri, httpMethod);
        }
    };
    template = new VaultTemplate(vault.getEndpoint(), factory, vault.getSimpleSessionManager());
    resolver = new VaultParametersResolver();
    feature = new VaultFeatureSettings(vault.getUrl(), "", "");
}