Jenkins 修改插件下载源
Docker 中 Rclone 配合 Alist 挂载网盘到本地
nip.io
适用于 Apache HttpClient java
import org.apache.http.conn.ssl.NoopHostnameVerifier; import org.apache.http.conn.ssl.SSLConnectionSocketFactory; import org.apache.http.conn.ssl.TrustStrategy; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; import org.apache.http.ssl.SSLContexts; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.web.client.RestTemplateBuilder; import org.springframework.boot.web.client.RestTemplateCustomizer; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; import org.springframework.web.client.RestTemplate; import javax.net.ssl.SSLContext; import java.security.KeyManagementException; import java.security.KeyStoreException; import java.security.NoSuchAlgorithmException; import java.util.List; /** * @author zhiwen95 * @date 2022/06/16 */ @Configuration public class RestTemplateConfiguration { @Autowired private List<RestTemplateCustomizer> customizers; @Bean public RestTemplate restTemplate() { return new RestTemplateBuilder(customizers.toArray(new RestTemplateCustomizer[0])) .requestFactory(() -> { HttpComponentsClientHttpRequestFactory requestFactory = new HttpComponentsClientHttpRequestFactory(); try { disableSslVerification(requestFactory); } catch (Exception e) { throw new RuntimeException(e); } return requestFactory; }) .