diff --git a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/config/WxPayConfig.java b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/config/WxPayConfig.java index 2586088194..8fed27452e 100644 --- a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/config/WxPayConfig.java +++ b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/config/WxPayConfig.java @@ -6,6 +6,7 @@ import com.github.binarywang.wxpay.v3.util.PemUtils; import jodd.util.ResourcesUtil; import lombok.Data; +import lombok.EqualsAndHashCode; import lombok.SneakyThrows; import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.RegExUtils; @@ -28,6 +29,7 @@ * @author Binary Wang (https://github.com/binarywang) */ @Data +@EqualsAndHashCode(exclude = "verifier") public class WxPayConfig { private static final String DEFAULT_PAY_BASE_URL = "https://api.mch.weixin.qq.com"; private static final String PROBLEM_MSG = "证书文件【%s】有问题,请核实!"; diff --git a/weixin-java-pay/src/test/java/com/github/binarywang/wxpay/config/WxPayConfigTest.java b/weixin-java-pay/src/test/java/com/github/binarywang/wxpay/config/WxPayConfigTest.java index fb46c58a4d..8b5a621b89 100644 --- a/weixin-java-pay/src/test/java/com/github/binarywang/wxpay/config/WxPayConfigTest.java +++ b/weixin-java-pay/src/test/java/com/github/binarywang/wxpay/config/WxPayConfigTest.java @@ -31,4 +31,10 @@ public void testInitSSLContext() throws Exception { this.testInitSSLContext_classpath(); this.testInitSSLContext_http(); } + + @Test + @SuppressWarnings("ResultOfMethodCallIgnored") + public void testHashCode() { + payConfig.hashCode(); + } }