-
Notifications
You must be signed in to change notification settings - Fork 6
Autowiring WxMpConfigStorage
Hippoom edited this page Jun 29, 2017
·
3 revisions
The starter provides a WxMpInMemoryConfigStorage
instance by default. You can setup your WeChat MP appId and secret in the application{-profile}.properties or application{-profile}.yaml
wechat:
mp:
appId: your-app-id
appSecret: your-app-secret
aesKey: your-aes-key-if-needed
You can provide a WxMpInRedisConfigStorage
instance if you opt for a redis
store:
@Configuration
public class YourWeChatMpConfiguration {
@Bean
protected WxMpConfigStorage configStorage(WeChatMpProperties weChatMpProperties) {
WxMpInRedisConfigStorage configStorage = new WxMpInRedisConfigStorage();
configStorage.setAppId(weChatMpProperties.getAppId());
configStorage.setSecret(weChatMpProperties.getAppSecret());
configStorage.setToken(weChatMpProperties.getToken());
configStorage.setAesKey(weChatMpProperties.getAesKey());
// omitted setters
return configStorage;
}
}
- Quick start
- weixin-java-mp support
- Autowiring WxMpConfigStorage
- API support
- Inbound messaging
- Identity & Access
- JS SDK support
- Testing
- Release notes