Tag

RefreshScope

1 views collected around this technical thread.

Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Dec 13, 2024 · Backend Development

How @RefreshScope Dynamically Refreshes Beans in Spring Boot

This article explains the purpose and inner workings of Spring Boot's @RefreshScope annotation, showing how it creates proxy and target beans, the proxy generation process, and how the /actuator/refresh endpoint triggers a full refresh of scoped beans at runtime.

Bean RefreshJavaRefreshScope
0 likes · 9 min read
How @RefreshScope Dynamically Refreshes Beans in Spring Boot
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Sep 13, 2024 · Backend Development

How to Dynamically Update Spring Boot Properties at Runtime Without Restart

This article explains several strategies for dynamically updating Spring Boot application properties—such as using prototype‑scoped beans, @RefreshScope with Spring Cloud, external configuration files, and custom PropertySource updates—so that changes take effect without restarting the service.

PropertySourcePrototype BeanRefreshScope
0 likes · 10 min read
How to Dynamically Update Spring Boot Properties at Runtime Without Restart
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.

Backend DevelopmentConfiguration 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
Dec 15, 2023 · Backend Development

How Spring Cloud Dynamically Refreshes @ConfigurationProperties Beans

This article explains how Spring Cloud discovers classes annotated with @ConfigurationProperties, wraps them into ConfigurationPropertiesBean objects, and dynamically rebinds them at runtime using RefreshScope, EnvironmentChangeEvent, and the RefreshEndpoint actuator, enhancing application flexibility and scalability.

ConfigurationPropertiesJavaRefreshScope
0 likes · 9 min read
How Spring Cloud Dynamically Refreshes @ConfigurationProperties Beans
Cognitive Technology Team
Cognitive Technology Team
Mar 12, 2022 · Backend Development

Why Spring Cloud @RefreshScope Prevents BeanPostProcessor from Processing Beans

The article explains that adding Spring Cloud's @RefreshScope annotation to beans annotated with @Service or @Component makes the bean definition synthetic, causing Spring's BeanPostProcessor to skip those beans and leading to processing failures.

BeanPostProcessorJavaRefreshScope
0 likes · 3 min read
Why Spring Cloud @RefreshScope Prevents BeanPostProcessor from Processing Beans
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.

Backend DevelopmentConfiguration RefreshJava
0 likes · 10 min read
How Spring Cloud RefreshScope Works: From Annotation to Runtime Refresh
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Jul 14, 2021 · Backend Development

Understanding Spring Cloud RefreshScope: How Dynamic Configuration Refresh Works

This article explains the inner workings of Spring Cloud's RefreshScope, detailing its source code, registration process, refresh endpoint activation, event-driven refresh mechanism, and how beans annotated with @RefreshScope or @ConfigurationProperties are dynamically reloaded without restarting the application.

ConfigurationRefreshScopeSpring
0 likes · 11 min read
Understanding Spring Cloud RefreshScope: How Dynamic Configuration Refresh Works
Java Architecture Diary
Java Architecture Diary
Jun 23, 2020 · Backend Development

Fixing @RefreshScope Conflict with @ConditionalOnSingleCandidate in Spring Boot

In Spring Cloud projects, adding @RefreshScope to a custom RabbitMQ ConnectionFactory can clash with @ConditionalOnSingleCandidate, preventing RabbitTemplate from being auto‑wired; this article explains the root cause, demonstrates how to diagnose the issue, and provides a solution to avoid such bean conflicts.

Bean InjectionConditionalOnSingleCandidateRabbitMQ
0 likes · 5 min read
Fixing @RefreshScope Conflict with @ConditionalOnSingleCandidate in Spring Boot