catch ConversionException and ConvertedNotFoundException in BeanWrapper's convertIfNecessary as well, in order to support constructor resolution (SPR-6563)
This commit is contained in:
@@ -32,6 +32,8 @@ public class TestClient {
|
||||
|
||||
private boolean bool;
|
||||
|
||||
private List<String> stringList;
|
||||
|
||||
private Resource[] resourceArray;
|
||||
|
||||
private List<Resource> resourceList;
|
||||
@@ -56,6 +58,14 @@ public class TestClient {
|
||||
this.bool = bool;
|
||||
}
|
||||
|
||||
public List<String> getStringList() {
|
||||
return stringList;
|
||||
}
|
||||
|
||||
public void setStringList(List<String> stringList) {
|
||||
this.stringList = stringList;
|
||||
}
|
||||
|
||||
public Resource[] getResourceArray() {
|
||||
return resourceArray;
|
||||
}
|
||||
|
||||
@@ -13,6 +13,14 @@
|
||||
|
||||
<bean id="testClient" class="org.springframework.context.conversionservice.TestClient">
|
||||
<property name="bool" value="true"/>
|
||||
<property name="stringList">
|
||||
<list>
|
||||
<value>#{'test-' + strValue + '-end'}</value>
|
||||
<value>#{'test-' + strValue}</value>
|
||||
<value>#{'test-' + numValue+ '-end'}</value>
|
||||
<value>#{'test-' + numValue}</value>
|
||||
</list>
|
||||
</property>
|
||||
<property name="resourceArray">
|
||||
<value>classpath:test.xml</value>
|
||||
</property>
|
||||
@@ -36,7 +44,15 @@
|
||||
<bean class="org.springframework.context.conversionservice.Bar">
|
||||
<constructor-arg value ="value2" />
|
||||
</bean>
|
||||
|
||||
|
||||
<bean id="numValue" class="java.lang.Integer">
|
||||
<constructor-arg value="111"/>
|
||||
</bean>
|
||||
|
||||
<bean id="strValue" class="java.lang.String">
|
||||
<constructor-arg value="222"/>
|
||||
</bean>
|
||||
|
||||
<context:annotation-config />
|
||||
|
||||
</beans>
|
||||
|
||||
Reference in New Issue
Block a user