dabing2010
可以扩展Spring的PropertyPlaceholderConfigurer,摘录别人一段代码你参考public class DecryptPropertyPlaceholderConfigurer extends PropertyPlaceholderConfigurer{ /** * 重写父类方法,解密指定属性名对应的属性值 */ @Override protected String convertProperty(String propertyName,String propertyValue){ if(isEncryptPropertyVal(propertyName)){ return DesUDecryptString(propertyValue);//调用解密方法 