File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
weixin-java-mp/src/test/java/me/chanjar/weixin/mp/demo Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 6
6
import me .chanjar .weixin .mp .api .WxMpInMemoryConfigStorage ;
7
7
8
8
import java .io .InputStream ;
9
+ import java .util .concurrent .locks .ReentrantLock ;
9
10
10
11
/**
11
12
* @author Daniel Qian
@@ -16,7 +17,11 @@ class WxMpDemoInMemoryConfigStorage extends WxMpInMemoryConfigStorage {
16
17
public static WxMpDemoInMemoryConfigStorage fromXml (InputStream is ) {
17
18
XStream xstream = XStreamInitializer .getInstance ();
18
19
xstream .processAnnotations (WxMpDemoInMemoryConfigStorage .class );
19
- return (WxMpDemoInMemoryConfigStorage ) xstream .fromXML (is );
20
+ WxMpDemoInMemoryConfigStorage wxMpDemoInMemoryConfigStorage = (WxMpDemoInMemoryConfigStorage ) xstream .fromXML (is );
21
+ wxMpDemoInMemoryConfigStorage .accessTokenLock = new ReentrantLock ();
22
+ wxMpDemoInMemoryConfigStorage .cardApiTicketLock = new ReentrantLock ();
23
+ wxMpDemoInMemoryConfigStorage .jsapiTicketLock = new ReentrantLock ();
24
+ return wxMpDemoInMemoryConfigStorage ;
20
25
}
21
26
22
27
@ Override
You can’t perform that action at this time.
0 commit comments