Spring 3 supports ${my.server.port:defaultValue} syntax.

 

@Value("${zookeeper.enable:false}")
private boolean isZkEnable;

 

done!

相关文章: