<bean id = "propertyConfigurer" class = "org.springframeword.context.support.PropertySourcesPlaceholderConfigurer">
<property name = "properties" ref = "localProperty"/>
<property name = "ignoreUnresolvablePlaceholders" value = "true"/>
<property name = "order" ref = "1"/>
</bean>
<bean id = "localProperty" class = "自定义解密处理类" init-method="loadProperties">
<property name = "properties" >
<list>
<value>配置文件路径</value>
</list>
</property>
</bean>
在配置文件中,数据库连接信息一般采用密文的形式,在spring容器读取配置文件中配置的加密值时,需先进行转换,故可以采用以上处理方式。