天天看點

關于spring整合後無法解析properties占位符的問題

原因是:spring先掃描了配置檔案,并讀取到記憶體中,沒有完成指派.

解決方案:降低配合檔案掃描器的優先級

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