Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wx-java-mp-multi-spring-boot-starter 如何开启 StableAccessToken ? #3259

Closed
qichhhhh opened this issue Apr 23, 2024 · 3 comments
Closed
Milestone

Comments

@qichhhhh
Copy link

单公众号的 wx-java-mp-spring-boot-starter 可以通过自己编写 WxMpConfigStorage 的实现类,重写 isStableAccessToken() return true; 从而实现获取 StableAccessToken,但是多公众号的 wx-java-mp-multi-spring-boot-starter 里的默认配置类是 WxMpInMemoryConfiguration.class ,里面的 protected WxMpDefaultConfigImpl wxMpConfigStorage(WxMpMultiProperties wxCpMultiProperties) 方法没有 @ConditionalOnMissingBean(WxMpConfigStorage.class),不知道该如何把自己的实现类注入进去,我应该怎么给 multi-starter 里的每个公众号启用 StableAccessToken ?

@qichhhhh
Copy link
Author

@foreveryang321
@binarywang
麻烦两位看一下

@foreveryang321
Copy link

加了是否使用 StableAccessToken 的配置,等合并或者自己打包吧

# 多公众号配置
wx:
  mp:
    apps:
      公众号1:
        use-stable-access-token: true
      公众号2:
        use-stable-access-token: false
# 单公众号配置
wx:
  mp:
    use-stable-access-token: true

@qichhhhh
Copy link
Author

加了是否使用 StableAccessToken 的配置,等合并或者自己打包吧

# 多公众号配置
wx:
  mp:
    apps:
      公众号1:
        use-stable-access-token: true
      公众号2:
        use-stable-access-token: false
# 单公众号配置
wx:
  mp:
    use-stable-access-token: true

感谢,我先自己打包一下,等待合并

@binarywang binarywang added this to the 4.6.2 milestone May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants