20160929随笔(进行applicationcontext.xml配置)

1、<context:annotation-config/> 进行注解的声明

  <context:component-scan base-package="com.commsoft.*" />扫面com.commsoft目录下面的所有配置文件

  <task:annotation-driven/> 解决定时问题

2、<content:property-placeholder  location ="classpath:properties/*.properties" />

  这样我们可以在项目中使用下列方法进行取值(需要时spring环境)

  @Value("${name}”)

  private String xxxx;

posted @ 2016-09-29 18:35  ffzzblog  阅读(135)  评论(0)    收藏  举报