-
Notifications
You must be signed in to change notification settings - Fork 735
ConfigurationProperties initial values not restored on DELETE /actuator/env #1616
Copy link
Copy link
Open
Labels
Milestone
Description
Describe the bug
We are setting a configuration value via POST /actuator/env and later attempt to restore the original value by running DELETE /actuator/env.
However, this does not work — Spring does not restore the values defined in the field declaration.
Sample
@ConfigurationProperties("my-properties")
class MyProperties {
private String name = "initial";
}Change the value via actuator and delete the change:
curl -H 'Content-Type: application/json' --data '{"name": "my-properties.name", "value": "from-actuator"}' -X POST http://localhost:8080/actuator/env
curl -X DELETE http://localhost:8080/actuator/env
After this, the value is still from-env although I would have expected initial again.
It seems likeJavaBeanBinder is not able to do that. (This is even tested here)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
In Progress