Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

修复无法切换到初始公众号配置的问题并完善了removeConfigStorage#1600

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
binarywang merged 2 commits intobinarywang:developfromrain7fine11:develop
Jun 3, 2020

Conversation

@rain7fine11
Copy link

简要描述

  • 使用springboot配置的单公众号工程,mpId=111,通过addConfigStorage添加新配置mpId=222,然后switchoverTo(222)转换到新配置,再切换回来switchoverTo(111)抛异常。
  • 调用removeConfigStorage删除配置时,如果删除了唯一配置或默认配置将导致异常。

模块版本情况

  • WxJava 模块名: weixin-java-mp
  • WxJava 版本号:3.8.0

详细描述

  • 调用setWxMpConfigStorage方法进行初始化配置时,尚无默认配置存于WxMpConfigStorageHolder中,所以get方法取到的只是默认值“default”而不是传入的mpId,再经过setMultiConfigStorages把“default”配置回WxMpConfigStorageHolder,导致出错。
public void setWxMpConfigStorage(WxMpConfigStorage wxConfigProvider) {    final String defaultMpId = WxMpConfigStorageHolder.get();    this.setMultiConfigStorages(ImmutableMap.of(defaultMpId, wxConfigProvider), defaultMpId);  }
  • 针对第二个问题添加了判断,根据情况打出warn日志。

@binarywangbinarywang merged commitb52e676 intobinarywang:developJun 3, 2020
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@rain7fine11@binarywang

[8]ページ先頭

©2009-2025 Movatter.jp