Add AOT support for TypedStringValue
This commit adds support for TypeStringValue when generating AOT code. If the value does not specify an explicit type, it's specified as is. Otherwise, the TypeStringValue instance is restored via the appropriate code generation. Closes gh-29074
This commit is contained in:
committed by
Stéphane Nicoll
parent
15c19411f6
commit
37c2619fc4
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
|
||||
|
||||
<bean id="properties"
|
||||
class="org.springframework.beans.factory.config.PropertiesFactoryBean">
|
||||
<property name="properties">
|
||||
<props>
|
||||
<prop key="name">John Smith</prop>
|
||||
<prop key="age">42</prop>
|
||||
<prop key="company">Acme Widgets, Inc.</prop>
|
||||
</props>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="employee" class="org.springframework.beans.testfixture.beans.Employee">
|
||||
<property name="name" value="#{properties['name']}" />
|
||||
<property name="age" value="#{properties['age']}" />
|
||||
<property name="company" value="#{properties['company']}" />
|
||||
</bean>
|
||||
|
||||
<bean id="pet" class="org.springframework.beans.testfixture.beans.Pet">
|
||||
<constructor-arg index="0" value="Fido" />
|
||||
</bean>
|
||||
|
||||
|
||||
</beans>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
|
||||
|
||||
<bean id="employee" class="org.springframework.beans.testfixture.beans.Employee">
|
||||
<property name="name" value="John Smith" />
|
||||
<property name="age">
|
||||
<value type="java.lang.Integer">42</value>
|
||||
</property>
|
||||
<property name="company" value="Acme Widgets, Inc." />
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
|
||||
|
||||
<bean id="employee" class="org.springframework.beans.testfixture.beans.Employee">
|
||||
<property name="name" value="John Smith" />
|
||||
<property name="age" value="42" />
|
||||
<property name="company" value="Acme Widgets, Inc." />
|
||||
</bean>
|
||||
|
||||
<bean id="pet" class="org.springframework.beans.testfixture.beans.Pet">
|
||||
<constructor-arg index="0" value="Fido" />
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
Reference in New Issue
Block a user