I have the following @ConfigurationProperties property holder:
@ConfigurationProperties(prefix = "custom.service")
public class CustomServicePropertyHolder {
private String name;
}
and my application.properties looks like this:
custom.service.name=${remote.service.name}
custom.service.....=...
custom.service.....=...
remove.service.name
is an environment variable received in the runtime.
However, when remote.service.name
was not provided, the value of the EtlConfigurationHolder.name
is a string "${remote.service.name}"
.
How to make the property to return null instead of this placeholder string ?