I am using
@Service
public class Foo
{
@Value ("${this.does.not.exist: 10}")
private static int bar;
}
Because the value does not exist in the configuration, I was expecting bar to have value 10 but it is 0.
I also tried @Value ("${this.does.not.exist: #{10}}") as per this answer, it's still zero.
Why didn't this work?