参考http://blog.csdn.net/zhayuyao/article/details/78553417
@Component public class A { private static String STR; @Value("${xx.xx}") public void setStr(String str) { STR = str; } }