<!-- 加载配置文件 -->
<context:property-placeholder location="classpath:*.properties" />
我认为是启动的时候还没加载这个扫描
改成
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>classpath:config.properties</value>
</list>
</property>
</bean>
这样的方式就获取到了属性