In Spring, I know I can use the @Value annotation to read the value of a shell variable, e.g.,
public class MyClass {
@Value("${SHELL_VAR})
String shellVariable;
public String getShellVar() {
return shellVariable;
}
}
But then the value of SHELL_VAR is read only once from the shell. I want a way to read SHELL_VAR each time I call getShellVar(), since it changes over time. Thank you.