前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
<?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"
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">
<util:properties id="placeholderProps"> <prop key="foo">bar</prop> </util:properties>
<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>