读书人

在spring3.1中怎么在annotation中注入

发布时间: 2013-12-19 00:33:34 作者: rapoo

在spring3.1中如何在annotation中注入properties中的值
spring.scheduler.cron = 0 0 0 0

??

???? 步骤2:????

<context:property-placeholder location="classpath:drm.properties" ignore-unresolvable="true"/> 

?

? ? 步骤3:????

        private String cron = null;@Value("${spring.scheduler.cron}")public void setCron(String cron) {this.cron = cron;}

?

读书人网 >Web前端

热点推荐