linwe
2024-09-03 764d883b5ea3bdc06abbec548b6df0511e567978
src/main/java/org/springblade/common/config/WxPayConfig.java
@@ -12,6 +12,7 @@
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import java.io.FileInputStream;
import java.nio.charset.StandardCharsets;
@@ -19,7 +20,6 @@
@Configuration
// @PropertySource("classpath:wxpay.properties") //读取配置文件
@ConfigurationProperties(prefix = "wxpay") //读取wxpay节点
@Data //使用set方法将wxpay节点中的值填充到当前类的属性中
@Slf4j
@@ -111,7 +111,7 @@
    *
    * @return
    */
   @Bean
//   @Bean
   public ScheduledUpdateCertificatesVerifier getVerifier() {
      log.info("获取签名验证器");
@@ -140,7 +140,7 @@
    * @param verifier
    * @return
    */
   @Bean(name = "wxPayClient")
//   @Bean(name = "wxPayClient")
   public CloseableHttpClient getWxPayClient(ScheduledUpdateCertificatesVerifier verifier) {
      log.info("获取httpClient");
@@ -162,7 +162,7 @@
   /**
    * 获取HttpClient,无需进行应答签名验证,跳过验签的流程
    */
   @Bean(name = "wxPayNoSignClient")
//   @Bean(name = "wxPayNoSignClient")
   public CloseableHttpClient getWxPayNoSignClient() {
      //获取商户私钥