WxJava icon indicating copy to clipboard operation
WxJava copied to clipboard

Verify and document useStableAccessToken configuration behavior

Open Copilot opened this issue 2 months ago • 0 comments

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 binarywang/WxJava#3696


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

Copilot avatar Sep 24 '25 13:09 Copilot