I have a bean in my spring boot app. It's properties i get from properties file. At some moment i need to update it's fields, also from properties file. How can i do it?
package com.sas.rus.casrows;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
@Component
@ConfigurationProperties(prefix="cas")
public class CasConnectionProperties {
private String host;
private int port;
private String username;
private String password;
private Boolean disableSSL;
public void setHost(String host) {
this.host = host;
}
public void setPort(int port) {
this.port = port;
}
public void setUsername(String username) {
this.username = username;
}
public void setPassword(String password) {
this.password = password;
}
public void setDisableSSL(Boolean disable) {
this.disableSSL = disable;
}
public String getHost() {
return host;
}
public int getPort() {
return port;
}
public String getUsername() {
return username;
}
public String getPassword() {
return password;
}
public Boolean getDisableSSL() {
return disableSSL;
}
}
i have already tried cloud, but it did not work. also tried to destroy and create the bean again, but any time got the same values (old, not the new ones) Hope you will help me