Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Sep 24, 2025

Issue

Users reported that the wx.miniapp.use-stable-access-token: true configuration was not taking effect in version 4.7.0, with the code still returning useStableAccessToken as false.

Investigation Results

Through comprehensive testing and code analysis, I confirmed that the configuration is working correctly in the current version (4.7.7.B). The issue appears to have been resolved in releases between 4.7.0 and 4.7.7.B.

Verification

Created comprehensive test applications that validate:

// Property binding works correctly
wx.miniapp.use-stable-access-token=true

// Configuration flows through all layers:
WxMaProperties.isUseStableAccessToken() → true
WxMaConfig.isStableAccessToken() → true  
WxMaService.getWxMaConfig().isStableAccessToken() → true

The configuration chain works as intended:

  1. Spring Boot binds kebab-case property to WxMaProperties.useStableAccessToken
  2. AbstractWxMaConfigStorageConfiguration reads via properties.isUseStableAccessToken()
  3. Sets value on config via config.useStableAccessToken(boolean)
  4. BaseWxMaServiceImpl.getAccessToken() correctly uses the setting to choose endpoints

Outcome

No code changes were required. The configuration works correctly in the current version. Users experiencing this issue should upgrade to version 4.7.7.B or newer.

Testing confirmed bidirectional property binding works for both true and false values across all storage configurations (Memory, Redis, Redisson).

Fixes #3696


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

@Copilot Copilot AI changed the title [WIP] useStableAccessToken配置true不生效 Verify and document useStableAccessToken configuration behavior Sep 24, 2025
Copilot finished work on behalf of binarywang September 24, 2025 14:06
@Copilot Copilot AI requested a review from binarywang September 24, 2025 14:06
@binarywang binarywang added this to the 4.7.9 milestone Sep 24, 2025
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

Successfully merging this pull request may close these issues.

useStableAccessToken配置true不生效
2 participants