Context namespace exposes value-separator attribute for property-placeholder element
Issue: SPR-7794
This commit is contained in:
@@ -11,4 +11,8 @@
|
||||
<constructor-arg value="${foo}"/>
|
||||
</bean>
|
||||
|
||||
<bean id="fallback" class="java.lang.String">
|
||||
<constructor-arg value="${bar:none}"/>
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
|
||||
@@ -2,18 +2,22 @@
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:util="http://www.springframework.org/schema/util"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
|
||||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd
|
||||
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd">
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
|
||||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.2.xsd
|
||||
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.2.xsd">
|
||||
|
||||
<util:properties id="placeholderProps">
|
||||
<prop key="foo">bar</prop>
|
||||
</util:properties>
|
||||
|
||||
<context:property-placeholder properties-ref="placeholderProps" system-properties-mode="OVERRIDE"/>
|
||||
<context:property-placeholder properties-ref="placeholderProps" system-properties-mode="OVERRIDE" value-separator="?"/>
|
||||
|
||||
<bean id="string" class="java.lang.String">
|
||||
<constructor-arg value="${foo}"/>
|
||||
</bean>
|
||||
|
||||
<bean id="fallback" class="java.lang.String">
|
||||
<constructor-arg value="${bar?none}"/>
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
|
||||
Reference in New Issue
Block a user