1.properties文件放resources目录下
2.spring容器中最多只能定义一个context:property-placeholder。所以引入多个文件要用正则表达式进行,如:
<context:property-placeholder location="classpath:/*.properties" />
3.使用变量方式
topic="${kafkaConfig.device_report}" //kafkaConfig.properties里的kafkaConfig.device_report
参考原文: http://www.cnblogs.com/brolanda/p/4244801.html