簡體   English   中英

我們可以使用 Jhipster Registry 中央配置方法和文件系統設置拉取頻率以從配置服務器獲得更好的即時更新嗎

[英]Can we set the frequency of pull to get better instant updates from config server using Jhipster Registry central-config approach with file-system

目前,我在我的項目 JHipster 微服務集中方法之一中使用 central-config 文件夾,使用 JHipster Registry 應用程序使用本機文件系統。

我有兩個問題要問——

  1. 如果我們可以設置拉取頻率,以便我們可以從配置服務器獲得更好的即時更新?

  2. 配置服務器如何處理從源(git 或二進制存儲庫)中提取信息的數據,就像將文件復制到本地目錄一樣,將信息保存在內存中?

  1. 這不是它的工作原理,應用程序不會定期輪詢配置服務器。 配置在啟動時加載。 如果您在配置服務器中進行更改並希望應用程序重新加載其應用程序上下文(另請參閱@RefreshScope bean 注釋), @RefreshScope您決定在每個客戶端上調用 /management/refresh 或者您將使用 Spring Bus(如果您使用它) 發送刷新事件,參見https://cloud.spring.io/spring-cloud-config/reference/html/#_push_notifications_and_spring_cloud_bus
  2. 對於git后端,服務器在第一次請求配置或啟動時克隆遠程存儲庫,然后根據spring.cloud.config.server.git.refreshRate值刷新,參見https://cloud.spring.io/spring-cloud-配置/參考/html/#_git_refresh_rate

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM