使用spring @Value注入属性值

要使用@Value ("${xx.yy.property}" )注入配置文件中的值,需要当前bean和placeholderConfigurer在同一个ApplicationContext中。

猜你喜欢

转载自byx5185.iteye.com/blog/2164774