🎨 优化代码
This commit is contained in:
@@ -6,6 +6,7 @@ import com.github.binarywang.wxpay.service.impl.WxPayServiceImpl;
|
||||
import com.google.inject.Binder;
|
||||
import com.google.inject.Module;
|
||||
import com.thoughtworks.xstream.XStream;
|
||||
import me.chanjar.weixin.common.error.WxRuntimeException;
|
||||
import me.chanjar.weixin.common.util.xml.XStreamInitializer;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -24,7 +25,7 @@ public class ApiTestModule implements Module {
|
||||
public void configure(Binder binder) {
|
||||
try (InputStream inputStream = ClassLoader.getSystemResourceAsStream(TEST_CONFIG_XML)) {
|
||||
if (inputStream == null) {
|
||||
throw new RuntimeException("测试配置文件【" + TEST_CONFIG_XML + "】未找到,请参照test-config-sample.xml文件生成");
|
||||
throw new WxRuntimeException("测试配置文件【" + TEST_CONFIG_XML + "】未找到,请参照test-config-sample.xml文件生成");
|
||||
}
|
||||
|
||||
XmlWxPayConfig config = this.fromXml(XmlWxPayConfig.class, inputStream);
|
||||
|
||||
Reference in New Issue
Block a user