spring配置文件中使用

<context:property-placeholder location="classpath:配置文件名"/>扫描配置文件。
使用语法:${key}