contextNamespaceHandlerTests-system.xml 1.0 KB
Newer Older
1 2 3 4
<?xml version="1.0" encoding="UTF-8"?>
<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"
S
Spring Operator 已提交
5 6 7
	xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-4.2.xsd
				http://www.springframework.org/schema/context https://www.springframework.org/schema/context/spring-context-4.2.xsd
				http://www.springframework.org/schema/util https://www.springframework.org/schema/util/spring-util-4.2.xsd">
8 9 10 11 12

	<util:properties id="placeholderProps">
		<prop key="foo">bar</prop>
	</util:properties>

13
	<context:property-placeholder properties-ref="placeholderProps" system-properties-mode="OVERRIDE" value-separator="?"/>
14 15 16 17 18

	<bean id="string" class="java.lang.String">
		<constructor-arg value="${foo}"/>
	</bean>

19 20 21 22
	<bean id="fallback" class="java.lang.String">
		<constructor-arg value="${bar?none}"/>
	</bean>

23
</beans>