From: Arjen J.W. P. <po...@us...> - 2008-10-14 15:23:54
|
Update of /cvsroot/springframework/spring/src/org/springframework/context/config In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv14854/src/org/springframework/context/config Modified Files: AbstractPropertyLoadingBeanDefinitionParser.java spring-context-2.5.xsd Log Message: SPR-5203 Index: spring-context-2.5.xsd =================================================================== RCS file: /cvsroot/springframework/spring/src/org/springframework/context/config/spring-context-2.5.xsd,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** spring-context-2.5.xsd 14 Oct 2008 08:23:39 -0000 1.14 --- spring-context-2.5.xsd 14 Oct 2008 15:23:38 -0000 1.15 *************** *** 23,27 **** <xsd:annotation> <xsd:documentation><![CDATA[ ! Activates replacement of ${...} placeholders, resolved against the specified properties file (if any). Falls back to resolving placeholders against JVM system properties. Alternatively, define a parameterized PropertyPlaceholderConfigurer bean in the context. --- 23,27 ---- <xsd:annotation> <xsd:documentation><![CDATA[ ! Activates replacement of ${...} placeholders, resolved against the specified properties file or Properties object (if any). Falls back to resolving placeholders against JVM system properties. Alternatively, define a parameterized PropertyPlaceholderConfigurer bean in the context. *************** *** 39,47 **** The location of the properties file to resolve placeholders against, as a Spring resource location: a URL, a "classpath:" pseudo URL, or a relative file path. ! Multiple locations may be specified, separated by commas. If no location is specified, placeholders will be resolved against system properties. ]]></xsd:documentation> </xsd:annotation> </xsd:attribute> </xsd:complexType> </xsd:element> --- 39,55 ---- The location of the properties file to resolve placeholders against, as a Spring resource location: a URL, a "classpath:" pseudo URL, or a relative file path. ! Multiple locations may be specified, separated by commas. If neither location nor properties-ref is specified, placeholders will be resolved against system properties. ]]></xsd:documentation> </xsd:annotation> </xsd:attribute> + <xsd:attribute name="properties-ref" type="xsd:string"> + <xsd:annotation> + <xsd:documentation source="java:java.util.Properties"><![CDATA[ + The bean name of a Java Properties object that will be used for property substitution. + If neither location nor properties-ref is specified, placeholders will be resolved against system properties. + ]]></xsd:documentation> + </xsd:annotation> + </xsd:attribute> </xsd:complexType> </xsd:element> *************** *** 69,72 **** --- 77,87 ---- </xsd:annotation> </xsd:attribute> + <xsd:attribute name="properties-ref" type="xsd:string"> + <xsd:annotation> + <xsd:documentation source="java:java.util.Properties"><![CDATA[ + The bean name of a Java Properties object that will be used for property overrides. + ]]></xsd:documentation> + </xsd:annotation> + </xsd:attribute> </xsd:complexType> </xsd:element> Index: AbstractPropertyLoadingBeanDefinitionParser.java =================================================================== RCS file: /cvsroot/springframework/spring/src/org/springframework/context/config/AbstractPropertyLoadingBeanDefinitionParser.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AbstractPropertyLoadingBeanDefinitionParser.java 5 Feb 2008 22:38:24 -0000 1.1 --- AbstractPropertyLoadingBeanDefinitionParser.java 14 Oct 2008 15:23:38 -0000 1.2 *************** *** 28,31 **** --- 28,32 ---- * * @author Juergen Hoeller + * @author Arjen Poutsma * @since 2.5.2 */ *************** *** 42,46 **** builder.addPropertyValue("locations", locations); } ! builder.setRole(BeanDefinition.ROLE_INFRASTRUCTURE); } --- 43,51 ---- builder.addPropertyValue("locations", locations); } ! String propertiesRef = element.getAttribute("properties-ref"); ! if (StringUtils.hasLength(propertiesRef)) { ! builder.addPropertyReference("properties", propertiesRef); ! } ! builder.setRole(BeanDefinition.ROLE_INFRASTRUCTURE); } |