POST
在雲配置客戶端上重新啓動後,會創建一個新的ConfigServicePropertySourceLocator
並保留舊的。問題是,它們都在重新啓動後被調用,所以如果我重新啓動10次,我得到11個豆和 11個調用,這導致11 GET
調用到配置服務器。重新啓動後在配置服務器上的多個請求
斷點SpringApplication#addInitializers(ApplicationContextInitializer<?>... initializers)
this = {[email protected]}
initializers = {ApplicationContextInitializer[2]@6093}
0 = {Proper[email protected]6097}
1 = {[email protected]}
this.initializers = {[email protected]} size = 10
0 = {[email protected]}
1 = {[email protected]}
2 = {[email protected]}
3 = {[email protected]}
4 = {[email protected]}
5 = {[email protected]}
6 = {[email protected]}
7 = {Proper[email protected]3705}
8 = {[email protected]}
9 = {BootstrapApplica[email protected]3715}
正如你所看到的,它即將的PropertySourceBootstrapConfiguration
另一個實例添加到列表initializer
。
什麼可能導致這種情況,我該如何避免它?
謝謝。我以爲我瘋了 – Olayinka