You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
In a Kotlin-based Spring application, @RefreshScope does not work correctly when applied to a class annotated with @ConfigurationProperties.
Expected Behavior:
When /actuator/refresh is invoked, the @ConfigurationProperties class should be reloaded with the updated values from the environment.
Actual Behavior:
Despite invoking /actuator/refresh, the @ConfigurationProperties class does not reload the updated values. The properties remain static, and changes in the environment are not applied.
• Spring Cloud Version: 2024.0.0
• Spring Boot Version: 3.4.1
This behavior is inconsistent with Java-based class, where @RefreshScope works as expected when applied to @ConfigurationProperties.
Describe the bug
In a Kotlin-based Spring application, @RefreshScope does not work correctly when applied to a class annotated with @ConfigurationProperties.
Expected Behavior:
When /actuator/refresh is invoked, the @ConfigurationProperties class should be reloaded with the updated values from the environment.
Actual Behavior:
Despite invoking /actuator/refresh, the @ConfigurationProperties class does not reload the updated values. The properties remain static, and changes in the environment are not applied.
• Spring Cloud Version: 2024.0.0
• Spring Boot Version: 3.4.1
This behavior is inconsistent with Java-based class, where @RefreshScope works as expected when applied to @ConfigurationProperties.
Sample
A sample application demonstrating this issue can be found here:
https://github.com/cj848/spring-cloud-properties-kotlin
** check this file https://github.com/cj848/spring-cloud-properties-kotlin/blob/main/src/test/kotlin/com/example/springcloudpropertieskotlin/TestPropertiesControllerTest.kt
The text was updated successfully, but these errors were encountered: