I want to change some values in my application.yml from my controller class during the runtime based on user response. I am using spring boot.
application.yml
resource:
KL-MED123-DEV #Change to something different depending on user response.
client:
CLI-AR234 #Change to something different depending on user response.
I want to change those values from the controller class.
PingController.java
@GetMapping("/ping")
public ResponseEntity<String> ping(){
/*
Logic to change something from here in the yml file.
*/
}
Thanks in advance
EDIT: Actually the values which are changed in the yaml file will be used again in the yaml file.