Skip to content

Commit 2b2a57b

Browse files
committed
Polish Javadoc
1 parent 3295289 commit 2b2a57b

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
@@ -37,16 +37,16 @@
3737
*
3838
* <pre class="code">
3939
* &lt;bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"&gt;
40-
* &lt;property name="driverClassName" value="${driver}" /&gt;
41-
* &lt;property name="url" value="jdbc:${dbname}" /&gt;
40+
* &lt;property name="driverClassName" value="${jdbc.driver}" /&gt;
41+
* &lt;property name="url" value="jdbc:${jdbc.dbname}" /&gt;
4242
* &lt;/bean&gt;
4343
* </pre>
4444
*
4545
* Example properties file:
4646
*
4747
* <pre class="code">
48-
* driver=com.mysql.jdbc.Driver
49-
* dbname=mysql:mydb</pre>
48+
* jdbc.driver=com.mysql.jdbc.Driver
49+
* jdbc.dbname=mysql:mydb</pre>
5050
*
5151
* Annotated bean definitions may take advantage of property replacement using
5252
* the {@link org.springframework.beans.factory.annotation.Value @Value} annotation:
@@ -79,7 +79,7 @@
7979
* <p>Example XML property with default value:
8080
*
8181
* <pre class="code">
82-
* &lt;property name="url" value="jdbc:${dbname:defaultdb}" /&gt;
82+
* &lt;property name="url" value="jdbc:${jdbc.dbname:defaultdb}" /&gt;
8383
* </pre>
8484
*
8585
* @author Chris Beams
@@ -103,6 +103,7 @@ public abstract class PlaceholderConfigurerSupport extends PropertyResourceConfi
103103
/** Default escape character: {@code '\'}. */
104104
public static final Character DEFAULT_ESCAPE_CHARACTER = '\\';
105105

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

@@ -133,34 +134,33 @@ public abstract class PlaceholderConfigurerSupport extends PropertyResourceConfi
133134

134135
/**
135136
* Set the prefix that a placeholder string starts with.
136-
* The default is {@value #DEFAULT_PLACEHOLDER_PREFIX}.
137+
* <p>The default is {@value #DEFAULT_PLACEHOLDER_PREFIX}.
137138
*/
138139
public void setPlaceholderPrefix(String placeholderPrefix) {
139140
this.placeholderPrefix = placeholderPrefix;
140141
}
141142

142143
/**
143144
* Set the suffix that a placeholder string ends with.
144-
* The default is {@value #DEFAULT_PLACEHOLDER_SUFFIX}.
145+
* <p>The default is {@value #DEFAULT_PLACEHOLDER_SUFFIX}.
145146
*/
146147
public void setPlaceholderSuffix(String placeholderSuffix) {
147148
this.placeholderSuffix = placeholderSuffix;
148149
}
149150

150151
/**
151-
* Specify the separating character between the placeholder variable
152-
* and the associated default value, or {@code null} if no such
153-
* special character should be processed as a value separator.
154-
* The default is {@value #DEFAULT_VALUE_SEPARATOR}.
152+
* Specify the separating character between the placeholder variable and the
153+
* associated default value, or {@code null} if no such special character
154+
* should be processed as a value separator.
155+
* <p>The default is {@value #DEFAULT_VALUE_SEPARATOR}.
155156
*/
156157
public void setValueSeparator(@Nullable String valueSeparator) {
157158
this.valueSeparator = valueSeparator;
158159
}
159160

160161
/**
161-
* Specify the escape character to use to ignore placeholder prefix
162-
* or value separator, or {@code null} if no escaping should take
163-
* place.
162+
* Specify the escape character to use to ignore the placeholder prefix or
163+
* value separator, or {@code null} if no escaping should take place.
164164
* <p>Default is {@link #DEFAULT_ESCAPE_CHARACTER}.
165165
* @since 6.2
166166
*/

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)