I have a class like this:
public AbstractConfig() {
super(DataConfig.MGR_NAME);
}
Inside DataConfig
there is:
public final String MGR_NAME = "theManager";
I find SpEL documentation confusing. Is there a way I can change a value if a Spring Profile is set? That is, if I have the Profile "AlternateManager" use theManagerAlt
, but default to theManager
otherwise?
While I made up this notation to get an active profile, I am hoping there exists some syntax like that below to make this work:
@Value("#PROFILE['AlternateManager'] ? 'theManagerAlt' : 'theManager' ")
public final String MGR_NAME;