I have an application.yml:
And the configuration:
@Component
@ConfigurationProperties("service")
class Config {
private List<String> hosts;
public List<String> getHosts() { return hosts; }
public void setHosts(List<String> hosts) { this.hosts = hosts; }
}
When i set the environment variable SERVICE_HOSTS=b,c the result in my Config is actually [a, c] when I expected [b, c]. I tried if this is specific to lists but the same happens with arrays. Same behavior in 1.4.0.RELEASE and current 1.4.1.BUILD-SNAPSHOT.