Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.net6 客户端动态更新连接字符串等 #216

Open
3 tasks done
jinghun1999 opened this issue Nov 17, 2022 · 1 comment
Open
3 tasks done

.net6 客户端动态更新连接字符串等 #216

jinghun1999 opened this issue Nov 17, 2022 · 1 comment

Comments

@jinghun1999
Copy link

jinghun1999 commented Nov 17, 2022

描述bug

在官方文档中Apollo.Client组件提供了监听配置变化的事件,但.net6使用的是Framework.Apollo组件,好像并未提供该事件。我们想动态的修改EF Core的连接字符串,并及时生效,是否有好的解决方法?

期望

能够动态的更改数据库连接字符串,Quartz的配置等

额外的细节和日志

  • 版本:.net6
  • 错误日志
  • 配置:
  • 平台和操作系统
@nobodyiam nobodyiam transferred this issue from apolloconfig/apollo Nov 20, 2022
@pengweiqhca
Copy link
Contributor

监听IConfiguration变更就可以了

IConfiguration configuration;
ChangeToken.OnChange(configuration.GetReloadToken, () => {});

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

No branches or pull requests

2 participants