Skip to content

Commit 8f525f0

Browse files
bianjprstoyanchev
authored andcommitted
Fix typos, formatting and escaping in reference
Note: Some symbol combinations (including <=) serve as textual symbol replacements in AsciiDoc. http://asciidoctor.org/docs/asciidoc-syntax-quick-reference/#text-replacement
1 parent 22a8a66 commit 8f525f0

File tree

6 files changed

+27
-27
lines changed

6 files changed

+27
-27
lines changed

spring-beans/src/main/java/org/springframework/beans/factory/annotation/Lookup.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
* beans, provide stub implementations of your lookup methods to be able to declare
4747
* them as concrete classes. And please remember that lookup methods won't work on
4848
* beans returned from {@code @Bean} methods in configuration classes; you'll have
49-
* to resort to {@code @Inject Provider&lt;TargetBean&gt;} or the like instead.
49+
* to resort to {@code @Inject Provider<TargetBean>} or the like instead.
5050
*
5151
* @author Juergen Hoeller
5252
* @since 4.1

src/docs/asciidoc/core/core-beans.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5624,7 +5624,7 @@ support for autowiring of `@Bean` methods:
56245624
}
56255625
----
56265626

5627-
The example autowires the `String` method parameter `country` to the value of the `Age`
5627+
The example autowires the `String` method parameter `country` to the value of the `age`
56285628
property on another bean named `privateInstance`. A Spring Expression Language element
56295629
defines the value of the property through the notation `#{ <expression> }`. For `@Value`
56305630
annotations, an expression resolver is preconfigured to look for bean names when

src/docs/asciidoc/core/core-expressions.adoc

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -778,11 +778,11 @@ expression based `matches` operator.
778778
779779
// evaluates to true
780780
boolean trueValue = parser.parseExpression(
781-
"'5.00' matches '\^-?\\d+(\\.\\d{2})?$'").getValue(Boolean.class);
781+
"'5.00' matches '^-?\\d+(\\.\\d{2})?$'").getValue(Boolean.class);
782782
783783
//evaluates to false
784784
boolean falseValue = parser.parseExpression(
785-
"'5.0067' matches '\^-?\\d+(\\.\\d{2})?$'").getValue(Boolean.class);
785+
"'5.0067' matches '^-?\\d+(\\.\\d{2})?$'").getValue(Boolean.class);
786786
----
787787

788788
[NOTE]
@@ -795,7 +795,7 @@ evaluates to `true`, as expected.
795795
Each symbolic operator can also be specified as a purely alphabetic equivalent. This
796796
avoids problems where the symbols used have special meaning for the document type in
797797
which the expression is embedded (eg. an XML document). The textual equivalents are
798-
shown here: `lt` (`<`), `gt` (`>`), `le` (`<=`), `ge` (`>=`), `eq` (`==`),
798+
shown here: `lt` (`<`), `gt` (`>`), `le` (`\<=`), `ge` (`>=`), `eq` (`==`),
799799
`ne` (`!=`), `div` (`/`), `mod` (`%`), `not` (`!`). These are case insensitive.
800800

801801

@@ -1230,15 +1230,16 @@ where the entry value is less than 27.
12301230

12311231
In addition to returning all the selected elements, it is possible to retrieve just the
12321232
first or the last value. To obtain the first entry matching the selection the syntax is
1233-
`^[...]` whilst to obtain the last matching selection the syntax is `$[...]`.
1233+
`.^[selectionExpression]` whilst to obtain the last matching selection the syntax is
1234+
`.$[selectionExpression]`.
12341235

12351236

12361237

12371238
[[expressions-collection-projection]]
12381239
=== Collection Projection
12391240

12401241
Projection allows a collection to drive the evaluation of a sub-expression and the
1241-
result is a new collection. The syntax for projection is `![projectionExpression]`. Most
1242+
result is a new collection. The syntax for projection is `.![projectionExpression]`. Most
12421243
easily understood by example, suppose we have a list of inventors but want the list of
12431244
cities where they were born. Effectively we want to evaluate 'placeOfBirth.city' for
12441245
every entry in the inventor list. Using projection:

src/docs/asciidoc/core/core-resources.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -494,9 +494,9 @@ When the path location contains an Ant-style pattern, for example:
494494
[subs="verbatim"]
495495
----
496496
/WEB-INF/*-context.xml
497-
com/mycompany/**/applicationContext.xml
498-
file:C:/some/path/*-context.xml
499-
classpath:com/mycompany/**/applicationContext.xml
497+
com/mycompany/**/applicationContext.xml
498+
file:C:/some/path/*-context.xml
499+
classpath:com/mycompany/**/applicationContext.xml
500500
----
501501

502502
The resolver follows a more complex but defined procedure to try to resolve the
@@ -512,7 +512,7 @@ the wildcards.
512512
===== Implications on portability
513513

514514
If the specified path is already a file URL (either explicitly, or implicitly because
515-
the base `ResourceLoader` is a filesystem one, then wildcarding is guaranteed to work in
515+
the base `ResourceLoader` is a filesystem one), then wildcarding is guaranteed to work in
516516
a completely portable fashion.
517517

518518
If the specified path is a classpath location, then the resolver must obtain the last

src/docs/asciidoc/web/webmvc-view.adoc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ generation (including validation error display). It is never necessary to use th
209209
macros to generate form input fields, and they can be mixed and matched with simple HTML
210210
or calls direct to the spring bind macros highlighted previously.
211211

212-
The following table of available macros show the VTL and FTL definitions and the
212+
The following table of available macros show the FTL definitions and the
213213
parameter list that each takes.
214214

215215
[[views-macros-defs-tbl]]
@@ -262,9 +262,9 @@ parameter list that each takes.
262262
| <@spring.showErrors separator, classOrStyle/>
263263
|===
264264

265-
* In FTL (FreeMarker), these two macros are not actually required as you can use the
266-
normal `formInput` macro, specifying ' `hidden`' or ' `password`' as the value for the
267-
`fieldType` parameter.
265+
* In FTL (FreeMarker), `formHiddenInput` and `formPasswordInput` are not actually required
266+
as you can use the normal `formInput` macro, specifying `hidden` or `password` as the
267+
value for the `fieldType` parameter.
268268

269269
The parameters to any of the above macros have consistent meanings:
270270

@@ -420,27 +420,27 @@ your model where they will be visible to your templates). The advantage of speci
420420
them in the templates is that they can be changed to different values later in the
421421
template processing to provide different behavior for different fields in your form.
422422

423-
To switch to XHTML compliance for your tags, specify a value of 'true' for a
423+
To switch to XHTML compliance for your tags, specify a value of `true` for a
424424
model/context variable named xhtmlCompliant:
425425

426426
[source,jsp,indent=0]
427427
[subs="verbatim,quotes"]
428428
----
429429
<#-- for FreeMarker -->
430-
<#assign xhtmlCompliant = true in spring>
430+
<#assign xhtmlCompliant = true>
431431
----
432432

433433
Any tags generated by the Spring macros will now be XHTML compliant after processing
434434
this directive.
435435

436436
In similar fashion, HTML escaping can be specified per field:
437437

438-
[source,xml,indent=0]
438+
[source,jsp,indent=0]
439439
[subs="verbatim,quotes"]
440440
----
441441
<#-- until this point, default HTML escaping is used -->
442442
443-
<#assign htmlEscape = true in spring>
443+
<#assign htmlEscape = true>
444444
<#-- next field will use HTML escaping -->
445445
<@spring.formInput "command.name"/>
446446

src/docs/asciidoc/web/webmvc.adoc

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ initialization parameters ( `init-param` elements) to the Servlet declaration in
479479
All `HandlerMapping` implementations supports handler interceptors that are useful when
480480
you want to apply specific functionality to certain requests, for example, checking for
481481
a principal. Interceptors must implement `HandlerInterceptor` from the
482-
`org.springframework .web .servlet` package with three methods that should provide enough
482+
`org.springframework.web.servlet` package with three methods that should provide enough
483483
flexibility to do all kinds of pre-processing and post-processing:
484484

485485
* `preHandle(..)` -- __before__ the actual handler is executed
@@ -498,7 +498,7 @@ configure interceptors. You can also register them directly via setters on indiv
498498
`HandlerMapping` implementations.
499499

500500
Note that `postHandle` is less useful with `@ResponseBody` and `ResponseEntity` methods for
501-
which a the response is written and committed within the `HandlerAdapter` and before
501+
which the response is written and committed within the `HandlerAdapter` and before
502502
`postHandle`. That means its too late to make any changes to the response such as adding
503503
an extra header. For such scenarios you can implement `ResponseBodyAdvice` and either
504504
declare it as an <<mvc-ann-controller-advice>> bean or configure it directly on
@@ -2543,8 +2543,8 @@ on a container object that specifies request headers and body. Below is an examp
25432543
@PostMapping("/something")
25442544
public ResponseEntity<String> handle() {
25452545
// ...
2546-
URI location = ...
2547-
return new ResponseEntity.created(location).build();
2546+
URI location = ... ;
2547+
return ResponseEntity.created(location).build();
25482548
}
25492549
----
25502550

@@ -4167,8 +4167,7 @@ And the same in XML use the `<mvc:view-controller>` element:
41674167
The MVC config simplifies the registration of view resolvers.
41684168

41694169
The following is a Java config example that configures content negotiation view
4170-
resolution using FreeMarker HTML templates and Jackson as a default `View` for
4171-
JSON rendering:
4170+
resolution using JSP and Jackson as a default `View` for JSON rendering:
41724171

41734172
[source,java,indent=0]
41744173
[subs="verbatim,quotes"]
@@ -4296,8 +4295,8 @@ See also
42964295
<<mvc-caching-static-resources, HTTP caching support for static resources>>.
42974296

42984297
The resource handler also supports a chain of
4299-
{api-spring-framework}/web/servlet/resource/ResourceResolver.html[ResourceResolver]'s and
4300-
{api-spring-framework}/web/servlet/resource/ResourceTransformer.html[ResourceTransformer]'s.
4298+
{api-spring-framework}/web/servlet/resource/ResourceResolver.html[ResourceResolver]s and
4299+
{api-spring-framework}/web/servlet/resource/ResourceTransformer.html[ResourceTransformer]s.
43014300
which can be used to create a toolchain for working with optimized resources.
43024301

43034302
The `VersionResourceResolver` can be used for versioned resource URLs based on an MD5 hash

0 commit comments

Comments
 (0)