From 96a619620c8268f523cb8ce5c18fa3fc11bc5b03 Mon Sep 17 00:00:00 2001 From: liurunyu <lry9898@163.com> Date: 星期三, 15 五月 2024 14:11:16 +0800 Subject: [PATCH] 增加了单数据源的Configuration,在SpringBoot的启动类Application中对其排除 --- pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/config/RestTemplateConfig.java | 34 ---------------------------------- 1 files changed, 0 insertions(+), 34 deletions(-) diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/config/RestTemplateConfig.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/config/RestTemplateConfig.java index 3ba853d..cb8956b 100644 --- a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/config/RestTemplateConfig.java +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/config/RestTemplateConfig.java @@ -22,40 +22,6 @@ @Autowired private RestTemplateWechatCertConfig restTemplateWechatCertConfig; - //@Bean - //public RestTemplate restTemplate() { - // return new RestTemplate(); - //} - - //@Bean - //public RestTemplate restTemplate() { - // String mchid = PayInfo.mchid; - // RestTemplate restTemplate = null; - // try { - // KeyStore keyStore = KeyStore.getInstance("PKCS12"); - // //InputStream cp = this.getClass().getResourceAsStream("apiclient_cert.p12"); - // FileInputStream instream = new FileInputStream(new File("C:\\webchat\\apiclient_cert.p12")); - // keyStore.load(instream, mchid.toCharArray()); - // // Trust own CA and all self-signed certs - // SSLContext sslcontext = SSLContextBuilder.create() - // .loadKeyMaterial(keyStore, mchid.toCharArray()) - // .build(); - // //Allow TLSv1 protocol only - // SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(sslcontext, new String[]{"TLSv1"}, null, NoopHostnameVerifier.INSTANCE); - // CloseableHttpClient httpClient = HttpClients.custom().setSSLSocketFactory(sslsf).build(); - // HttpComponentsClientHttpRequestFactory factory = new HttpComponentsClientHttpRequestFactory(httpClient); - // - // restTemplate = new RestTemplate(factory); - // //灏嗚浆鎹㈠櫒鐨勭紪鐮佹崲鎴恥tf-8 - // restTemplate.getMessageConverters().set(1, new StringHttpMessageConverter(Charset.forName("utf-8"))); - // //System.out.println("restTemplate.hashCode():" + restTemplate.hashCode()); - // } catch (Exception e) { - // e.printStackTrace(); - // } - // return restTemplate; - //} - - //@Bean(name = "wechatRestTemplate") @Bean() public RestTemplate restTemplate() throws Exception { RestTemplate restTemplate = new RestTemplate(restTemplateWechatCertConfig.wechatHttpRequestFactory()); -- Gitblit v1.8.0