Skip to content

Commit

Permalink
test of (TypedStringValue) propertyValue.getValue()
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongliangjun1 committed Nov 29, 2014
1 parent e351933 commit 762e653
Showing 1 changed file with 3 additions and 0 deletions.
Expand Up @@ -6,6 +6,7 @@
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.beans.factory.config.TypedStringValue;

/**
* Created with IntelliJ IDEA.
Expand All @@ -26,6 +27,8 @@ public void postProcessBeanFactory(ConfigurableListableBeanFactory configurableL
System.out.println("myBeanDefinition.isSingleton() : "+myBeanDefinition.isSingleton());
MutablePropertyValues propertyValues = myBeanDefinition.getPropertyValues();
PropertyValue propertyValue = propertyValues.getPropertyValue("sex");
TypedStringValue value = (TypedStringValue) propertyValue.getValue();
String strValue = value.getValue();
propertyValue.setConvertedValue("guess ni mei");
System.out.println("modify myBean sex");
}
Expand Down

0 comments on commit 762e653

Please sign in to comment.