Tagged articles
3 articles
Page 1 of 1
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
May 11, 2024 · Backend Development

How to Dynamically Refresh Spring Boot Configurations at Runtime

This article explains two practical approaches for achieving real‑time external configuration refresh in Spring Boot 2.7, covering a custom ApplicationContextInitializer that periodically updates the Environment and a bean‑refresh technique using ContextRefreshedEvent to rebind @ConfigurationProperties, complete with code examples and testing endpoints.

ApplicationContextInitializerConfiguration RefreshRefreshScope
0 likes · 9 min read
How to Dynamically Refresh Spring Boot Configurations at Runtime
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Aug 10, 2021 · Backend Development

How Spring Cloud RefreshScope Works: From Annotation to Runtime Refresh

This article explains the inner workings of Spring Cloud's RefreshScope, covering its annotation definition, registration in the auto‑configuration, the refresh endpoint workflow, event handling, and how beans annotated with @ConfigurationProperties or @RefreshScope are dynamically refreshed at runtime.

@RefreshScopeConfiguration RefreshSpring Boot
0 likes · 10 min read
How Spring Cloud RefreshScope Works: From Annotation to Runtime Refresh
Top Architect
Top Architect
Jun 2, 2021 · Backend Development

Dynamic Array Injection and Configuration Refresh in Spring Cloud

This article explains how to enable Spring Cloud to refresh configuration properties that are arrays, discusses the underlying Spring Environment and BeanFactory mechanisms, and presents a practical trick using a custom PropertySource to achieve dynamic array injection during refresh.

Array InjectionConfiguration RefreshMicroservices
0 likes · 11 min read
Dynamic Array Injection and Configuration Refresh in Spring Cloud