测试配置中增加证书文件路径的设置

This commit is contained in:
Binary Wang
2016-12-29 19:00:32 +08:00
parent 7363574a36
commit 013da38f00
2 changed files with 17 additions and 15 deletions

View File

@@ -15,10 +15,11 @@ public class ApiTestModule implements Module {
@Override
public void configure(Binder binder) {
try (InputStream is1 = ClassLoader
.getSystemResourceAsStream("test-config.xml")) {
.getSystemResourceAsStream("test-config.xml")) {
WxXmlMpInMemoryConfigStorage config = this
.fromXml(WxXmlMpInMemoryConfigStorage.class, is1);
.fromXml(WxXmlMpInMemoryConfigStorage.class, is1);
config.setAccessTokenLock(new ReentrantLock());
config.setSslContextFilePath(config.getKeyPath());
WxMpService wxService = new WxMpServiceImpl();
wxService.setWxMpConfigStorage(config);