Skip to content

Commit 6878587

Browse files
committed
Merge branch '6.2.x'
2 parents 32e2c45 + 2b2a57b commit 6878587

File tree

2 files changed

+21
-19
lines changed

2 files changed

+21
-19
lines changed

spring-beans/src/main/java/org/springframework/beans/factory/config/PlaceholderConfigurerSupport.java

+14-14
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,16 @@
3838
*
3939
* <pre class="code">
4040
* &lt;bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"&gt;
41-
* &lt;property name="driverClassName" value="${driver}" /&gt;
42-
* &lt;property name="url" value="jdbc:${dbname}" /&gt;
41+
* &lt;property name="driverClassName" value="${jdbc.driver}" /&gt;
42+
* &lt;property name="url" value="jdbc:${jdbc.dbname}" /&gt;
4343
* &lt;/bean&gt;
4444
* </pre>
4545
*
4646
* Example properties file:
4747
*
4848
* <pre class="code">
49-
* driver=com.mysql.jdbc.Driver
50-
* dbname=mysql:mydb</pre>
49+
* jdbc.driver=com.mysql.jdbc.Driver
50+
* jdbc.dbname=mysql:mydb</pre>
5151
*
5252
* Annotated bean definitions may take advantage of property replacement using
5353
* the {@link org.springframework.beans.factory.annotation.Value @Value} annotation:
@@ -80,7 +80,7 @@
8080
* <p>Example XML property with default value:
8181
*
8282
* <pre class="code">
83-
* &lt;property name="url" value="jdbc:${dbname:defaultdb}" /&gt;
83+
* &lt;property name="url" value="jdbc:${jdbc.dbname:defaultdb}" /&gt;
8484
* </pre>
8585
*
8686
* @author Chris Beams
@@ -104,6 +104,7 @@ public abstract class PlaceholderConfigurerSupport extends PropertyResourceConfi
104104
/** Default escape character: {@code '\'}. */
105105
public static final Character DEFAULT_ESCAPE_CHARACTER = '\\';
106106

107+
107108
/** Defaults to {@value #DEFAULT_PLACEHOLDER_PREFIX}. */
108109
protected String placeholderPrefix = DEFAULT_PLACEHOLDER_PREFIX;
109110

@@ -129,34 +130,33 @@ public abstract class PlaceholderConfigurerSupport extends PropertyResourceConfi
129130

130131
/**
131132
* Set the prefix that a placeholder string starts with.
132-
* The default is {@value #DEFAULT_PLACEHOLDER_PREFIX}.
133+
* <p>The default is {@value #DEFAULT_PLACEHOLDER_PREFIX}.
133134
*/
134135
public void setPlaceholderPrefix(String placeholderPrefix) {
135136
this.placeholderPrefix = placeholderPrefix;
136137
}
137138

138139
/**
139140
* Set the suffix that a placeholder string ends with.
140-
* The default is {@value #DEFAULT_PLACEHOLDER_SUFFIX}.
141+
* <p>The default is {@value #DEFAULT_PLACEHOLDER_SUFFIX}.
141142
*/
142143
public void setPlaceholderSuffix(String placeholderSuffix) {
143144
this.placeholderSuffix = placeholderSuffix;
144145
}
145146

146147
/**
147-
* Specify the separating character between the placeholder variable
148-
* and the associated default value, or {@code null} if no such
149-
* special character should be processed as a value separator.
150-
* The default is {@value #DEFAULT_VALUE_SEPARATOR}.
148+
* Specify the separating character between the placeholder variable and the
149+
* associated default value, or {@code null} if no such special character
150+
* should be processed as a value separator.
151+
* <p>The default is {@value #DEFAULT_VALUE_SEPARATOR}.
151152
*/
152153
public void setValueSeparator(@Nullable String valueSeparator) {
153154
this.valueSeparator = valueSeparator;
154155
}
155156

156157
/**
157-
* Specify the escape character to use to ignore placeholder prefix
158-
* or value separator, or {@code null} if no escaping should take
159-
* place.
158+
* Specify the escape character to use to ignore the placeholder prefix or
159+
* value separator, or {@code null} if no escaping should take place.
160160
* <p>Default is {@link #DEFAULT_ESCAPE_CHARACTER}.
161161
* @since 6.2
162162
*/

spring-beans/src/main/java/org/springframework/beans/factory/config/PropertyOverrideConfigurer.java

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2024 the original author or authors.
2+
* Copyright 2002-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -35,12 +35,14 @@
3535
*
3636
* Example properties file:
3737
*
38-
* <pre class="code">dataSource.driverClassName=com.mysql.jdbc.Driver
38+
* <pre class="code">
39+
* dataSource.driverClassName=com.mysql.jdbc.Driver
3940
* dataSource.url=jdbc:mysql:mydb</pre>
4041
*
41-
* In contrast to PropertyPlaceholderConfigurer, the original definition can have default
42-
* values or no values at all for such bean properties. If an overriding properties file does
43-
* not have an entry for a certain bean property, the default context definition is used.
42+
* <p>In contrast to {@link PropertyPlaceholderConfigurer}, the original definition
43+
* can have default values or no values at all for such bean properties. If an
44+
* overriding properties file does not have an entry for a certain bean property,
45+
* the default context definition is used.
4446
*
4547
* <p>Note that the context definition <i>is not</i> aware of being overridden;
4648
* so this is not immediately obvious when looking at the XML definition file.

0 commit comments

Comments
 (0)