使用@Value注入表達式:
1.注入普通字符
@Value("注入普通字符")
2.注入操作系統屬性
@Value(#{SystemProperties['os.name']})
3.表達式
@Value(#T(java.lang.Math).random()*100.0)
4.其他Bean的屬性
@Value("#{其他Bean的name.其他Bean的屬性}")
5.文件資源
@Value("classpath:其他文件的路徑")
6.網址資源
@Value("www.baidu.com")
7.其他配置文件的屬性,注意這個使用$,而不是#
@Value("${book.name}")
