Skip to content

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

Closed

Description

@qichhhhh

单公众号的 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 ?

Activity

  1. qichhhhh commented on Apr 23, 2024

    @qichhhhh
    Author

    @foreveryang321
    @binarywang
    麻烦两位看一下

  2. foreveryang321 commented on Apr 25, 2024

    @foreveryang321

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

    # 多公众号配置
    wx:
      mp:
        apps:
          公众号1:
            use-stable-access-token: true
          公众号2:
            use-stable-access-token: false
    # 单公众号配置
    wx:
      mp:
        use-stable-access-token: true
  3. qichhhhh commented on Apr 25, 2024

    @qichhhhh
    Author

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

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

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

  4. added this to the 4.6.2 milestone on May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions