关于spring整合后无法解析properties占位符的问题

来源:互联网 发布:音乐改编软件手机 编辑:程序博客网 时间:2024/06/06 09:17

原因是:spring先扫描了配置文件,并读取到内存中,没有完成赋值.

解决方案:降低配合文件扫描器的优先级

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


0 0