问题描述
Could not resolve placeholder 'redis.pool.maxTotal' in string value "${redis.pool.maxTotal}
原因
不同的配置文件中都出现配置文件导入
dao.xml
<context:property-placeholder location="classpath*:properties/db.properties" />
redis.xml
<context:property-placeholder location="classpath*:properties/*.properties" />
解决问题
将dao的配置文件引入改为
<context:property-placeholder location="classpath*:properties/*.properties" />
具体原理 ,参考