Skip to content

Commit 50bed38

Browse files
committed
Polishing
1 parent 6890e65 commit 50bed38

File tree

3 files changed

+18
-17
lines changed

3 files changed

+18
-17
lines changed

spring-context/src/main/java/org/springframework/validation/support/BindingAwareModelMap.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
/**
2525
* Subclass of {@link org.springframework.ui.ExtendedModelMap} that automatically removes
2626
* a {@link org.springframework.validation.BindingResult} object if the corresponding
27-
* target attribute gets replaced through regulat {@link Map} operations.
27+
* target attribute gets replaced through regular {@link Map} operations.
2828
*
2929
* <p>This is the class exposed to handler methods by Spring MVC, typically consumed through
3030
* a declaration of the {@link org.springframework.ui.Model} interface. There is no need to

src/asciidoc/core-beans.adoc

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4281,16 +4281,16 @@ any). These types must be 'wired up' explicitly via XML or using a Spring `@Bean
42814281

42824282

42834283
[[beans-autowired-annotation-primary]]
4284-
=== Fine-tuning annotation-based autowiring with primary
4285-
Because autowiring by type may lead to multiple candidates, it is often necessary to
4286-
have more control over the selection process. One way to accomplish this is with
4287-
Spring's `@Primary` annotation. `@Primary` indicates that a bean should be given
4288-
preference when multiple candidates are qualified to autowire a single-valued dependency.
4289-
If exactly one 'primary' bean exists among the candidates, it will be the autowired
4290-
value.
4284+
=== Fine-tuning annotation-based autowiring with @Primary
4285+
Because autowiring by type may lead to multiple candidates, it is often necessary to have
4286+
more control over the selection process. One way to accomplish this is with Spring's
4287+
`@Primary` annotation. `@Primary` indicates that a particular bean should be given
4288+
preference when multiple beans are candidates to be autowired to a single-valued
4289+
dependency. If exactly one 'primary' bean exists among the candidates, it will be the
4290+
autowired value.
42914291

4292-
Let's assume the following configuration that define `firstMovieCatalog` as the _primary_
4293-
`MovieCatalog`
4292+
Let's assume we have the following configuration that defines `firstMovieCatalog` as the
4293+
_primary_ `MovieCatalog`.
42944294

42954295
[source,java,indent=0]
42964296
[subs="verbatim,quotes"]
@@ -4310,7 +4310,8 @@ Let's assume the following configuration that define `firstMovieCatalog` as the
43104310
}
43114311
----
43124312

4313-
With such configuration, `MovieRecommender` will use `firstMovieCatalog`
4313+
With such configuration, the following `MovieRecommender` will be autowired with the
4314+
`firstMovieCatalog`.
43144315

43154316
[source,java,indent=0]
43164317
[subs="verbatim,quotes"]
@@ -4444,14 +4445,14 @@ optional semantic qualifiers. This means that qualifier values, even with the be
44444445
fallback, always have narrowing semantics within the set of type matches; they do not
44454446
semantically express a reference to a unique bean id. Good qualifier values are "main"
44464447
or "EMEA" or "persistent", expressing characteristics of a specific component that are
4447-
independent from the bean id, which may be auto-generated in case of an anonymous bean
4448+
independent from the bean `id`, which may be auto-generated in case of an anonymous bean
44484449
definition like the one in the preceding example.
44494450

44504451
Qualifiers also apply to typed collections, as discussed above, for example, to
44514452
`Set<MovieCatalog>`. In this case, all matching beans according to the declared
44524453
qualifiers are injected as a collection. This implies that qualifiers do not have to be
44534454
unique; they rather simply constitute filtering criteria. For example, you can define
4454-
multiple `MovieCatalog` beans with the same qualifier value "action"; all of which would
4455+
multiple `MovieCatalog` beans with the same qualifier value "action", all of which would
44554456
be injected into a `Set<MovieCatalog>` annotated with `@Qualifier("action")`.
44564457

44574458
[TIP]

src/asciidoc/web-mvc.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4591,10 +4591,10 @@ available.
45914591
[[mvc-config-conversion]]
45924592
=== Conversion and Formatting
45934593

4594-
By default formatters for Numbers and Date types are installed, including support for the @NumberFormat
4595-
and @DateTimeFormat annotations. Full support for the Joda Time formatting library is also installed
4596-
if Joda Time is present on the classpath. To register custom formatters and converters override
4597-
the `addFormatters` method:
4594+
By default formatters for `Number` and `Date` types are installed, including support for
4595+
the `@NumberFormat` and `@DateTimeFormat` annotations. Full support for the Joda Time
4596+
formatting library is also installed if Joda Time is present on the classpath. To
4597+
register custom formatters and converters, override the `addFormatters` method:
45984598

45994599
[source,java,indent=0]
46004600
[subs="verbatim,quotes"]

0 commit comments

Comments
 (0)