|
2 | 2 |
|
3 | 3 | import com.github.binarywang.demo.wx.mp.handler.*;
|
4 | 4 | import lombok.AllArgsConstructor;
|
5 |
| -import me.chanjar.weixin.mp.api.WxMpInMemoryConfigStorage; |
6 | 5 | import me.chanjar.weixin.mp.api.WxMpMessageRouter;
|
7 | 6 | import me.chanjar.weixin.mp.api.WxMpService;
|
8 | 7 | import me.chanjar.weixin.mp.api.impl.WxMpServiceImpl;
|
9 |
| -import me.chanjar.weixin.mp.constant.WxMpEventConstants; |
| 8 | +import me.chanjar.weixin.mp.config.impl.WxMpDefaultConfigImpl; |
10 | 9 | import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
11 | 10 | import org.springframework.context.annotation.Bean;
|
12 | 11 | import org.springframework.context.annotation.Configuration;
|
@@ -56,13 +55,13 @@ public WxMpService wxMpService() {
|
56 | 55 | WxMpService service = new WxMpServiceImpl();
|
57 | 56 | service.setMultiConfigStorages(configs
|
58 | 57 | .stream().map(a -> {
|
59 |
| - WxMpInMemoryConfigStorage configStorage = new WxMpInMemoryConfigStorage(); |
| 58 | + WxMpDefaultConfigImpl configStorage = new WxMpDefaultConfigImpl(); |
60 | 59 | configStorage.setAppId(a.getAppId());
|
61 | 60 | configStorage.setSecret(a.getSecret());
|
62 | 61 | configStorage.setToken(a.getToken());
|
63 | 62 | configStorage.setAesKey(a.getAesKey());
|
64 | 63 | return configStorage;
|
65 |
| - }).collect(Collectors.toMap(WxMpInMemoryConfigStorage::getAppId, a -> a, (o, n) -> o))); |
| 64 | + }).collect(Collectors.toMap(WxMpDefaultConfigImpl::getAppId, a -> a, (o, n) -> o))); |
66 | 65 | return service;
|
67 | 66 | }
|
68 | 67 |
|
|
0 commit comments