-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
CP_如何动态支持多个企业号 #2594
Comments
这样感觉可以; |
目前看来不会 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
已经实现: #2694 |
可以参考本项目中微信公众号的解决方式,用 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
简要描述
在 CP_如何支持多个企业号的
wiki
中CP的基本配置信息(secret,token,aesKey)都是配置在配置文件中的,然后启动服务的时候直接生成了多个WxCpService
然后存储在map中问题
我的服务中有很多个CP的配置信息(100个)并且都存在数据库中,我感觉在项目启动的时候生成100个
WxCpService
非常不妥,并且这个配置信息还会动态递增(每接入一个CP用户,我就要在数据库中新增一条配置信息),请问有较好的方式解决这个问题吗。就比如说我需要调用某个CP用户的接口,就根据数据库里面的配置信息为它生成一个
WxCpService
,主要的步骤就是每次都需要调用setWxCpConfigStorage
把数据库存储的配置注入进去,但是setWxCpConfigStorage
方法中有一个initHttp()
,频繁的调用initHttp()
会有性能影响吗The text was updated successfully, but these errors were encountered: