本文整理汇总了Java中org.springframework.beans.factory.config.ConfigurableListableBeanFactory.equals方法的典型用法代码示例。如果您正苦于以下问题:Java ConfigurableListableBeanFactory.equals方法的具体用法?Java ConfigurableListableBeanFactory.equals怎么用?Java ConfigurableListableBeanFactory.equals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.springframework.beans.factory.config.ConfigurableListableBeanFactory
的用法示例。
在下文中一共展示了ConfigurableListableBeanFactory.equals方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: processProperties
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; //导入方法依赖的package包/类
@Override
protected void processProperties(ConfigurableListableBeanFactory beanFactoryToProcess, Properties props) throws BeansException {
StringValueResolver valueResolver = new StringValueResolver() {
@Override
public String resolveStringValue(String strVal) {
StringBuffer sb = new StringBuffer(strVal);
/**
* 给变量加上${XXXXXXX}
*/
boolean start = strVal.startsWith(Constant.PLACEHOLDER_PREFIX);
boolean end = strVal.endsWith(Constant.PLACEHOLDER_SUFFIX);
while(start && end) {
String key = sb.substring(placeholderPrefix.length(), sb.length() - placeholderSuffix.length());
String zkValue = ShiZiQiuConfClient.get(key, "");
logger.info(">>>>>>>>>>> resolved placeholder '" + key + "' to value [" + zkValue + "]");
sb = new StringBuffer(zkValue);
start = sb.toString().startsWith(placeholderPrefix);
end = sb.toString().endsWith(placeholderSuffix);
}
return sb.toString();
}
};
BeanDefinitionVisitor visitor = new BeanDefinitionVisitor(valueResolver);
String[] beanNames = beanFactoryToProcess.getBeanDefinitionNames();
if (null != beanNames && beanNames.length > 0) {
for (String beanName : beanNames) {
if(!(beanName.equals(this.beanName)) && beanFactoryToProcess.equals(this.beanFactory)) {
BeanDefinition bd = beanFactoryToProcess.getBeanDefinition(beanName);
visitor.visitBeanDefinition(bd);
}
}
}
}