Browse Source
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-29074pull/31428/head
Stephane Nicoll
1 year ago
committed by
Stéphane Nicoll
8 changed files with 197 additions and 4 deletions
@ -0,0 +1,27 @@
@@ -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 @@
@@ -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 @@
@@ -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> |
Loading…
Reference in new issue