Skip to content

Commit a8f4c59

Browse files
cac03jhoeller
authored andcommitted
Fix trivial errors in data-access and core-aop in docs
Fix some syntax errors and typos * Fix syntax error in core-aop docs which caused incorrect document generation * Surround @pointcut values with quotation marks * Replace 'I' with 'you' in the 'In the XML style I can declare the first two pointcuts' sentence * Fix compileror typo * Remove redundant parenthesis * Remove redundant commas * Add 'can' to the 'You configure additional aspects in similar fashion' sentence * Replace 'You can annotation any method' with 'You can annotate any method' * Add space to 'non-recoverablepersistence' * Replace 'we shows' with 'we show' * Fix 'java.utils.Map' typo * Add space to 'byusing' * Add space to '`Lifecycle`by' * Replace 'You cN' with 'You can' * Replace 'encourag' with 'encourage'
1 parent 058f027 commit a8f4c59

File tree

2 files changed

+22
-21
lines changed

2 files changed

+22
-21
lines changed

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

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1328,7 +1328,8 @@ If the first parameter is of the `JoinPoint`, `ProceedingJoinPoint`, or
13281328
of the `argNames` attribute. For example, if you modify the preceding advice to receive
13291329
the join point object, the `argNames` attribute need not include it:
13301330
+
1331-
====[source,java,indent=0]
1331+
====
1332+
[source,java,indent=0]
13321333
[subs="verbatim,quotes"]
13331334
----
13341335
@Before(value="com.xyz.lib.Pointcuts.anyPublicMethod() && target(bean) && @annotation(auditable)",
@@ -1751,7 +1752,7 @@ Assume that you have a `SystemArchitecture` aspect as described in <<aop-common-
17511752
Then declaring a pointcut inside an aspect is very similar to declaring a top-level pointcut,
17521753
as the following example shows:
17531754

1754-
===
1755+
====
17551756
[source,xml,indent=0]
17561757
[subs="verbatim"]
17571758
----
@@ -2564,18 +2565,18 @@ something like the following:
25642565
[source,java,indent=0]
25652566
[subs="verbatim"]
25662567
----
2567-
@Pointcut(execution(* get*()))
2568+
@Pointcut("execution(* get*())")
25682569
public void propertyAccess() {}
25692570
2570-
@Pointcut(execution(org.xyz.Account+ *(..))
2571+
@Pointcut("execution(org.xyz.Account+ *(..))")
25712572
public void operationReturningAnAccount() {}
25722573
2573-
@Pointcut(propertyAccess() && operationReturningAnAccount())
2574+
@Pointcut("propertyAccess() && operationReturningAnAccount()")
25742575
public void accountPropertyAccess() {}
25752576
----
25762577
====
25772578

2578-
In the XML style I can declare the first two pointcuts:
2579+
In the XML style you can declare the first two pointcuts:
25792580

25802581
[source,xml,indent=0]
25812582
[subs="verbatim"]
@@ -2862,7 +2863,7 @@ See the {api-spring-framework}/aop/aspectj/annotation/AspectJProxyFactory.html[J
28622863
== Using AspectJ with Spring Applications
28632864

28642865
Everything we have covered so far in this chapter is pure Spring AOP. In this section,
2865-
we look at how you can use the AspectJ compileror weaver instead of or in
2866+
we look at how you can use the AspectJ compiler or weaver instead of or in
28662867
addition to Spring AOP if your needs go beyond the facilities offered by Spring AOP
28672868
alone.
28682869

@@ -2910,7 +2911,7 @@ following example shows:
29102911
When used as a marker interface in this way, Spring configures new instances of the
29112912
annotated type (`Account`, in this case) by using a bean definition (typically
29122913
prototype-scoped) with the same name as the fully-qualified type name
2913-
()`com.xyz.myapp.domain.Account`). Since the default name for a bean is the
2914+
(`com.xyz.myapp.domain.Account`). Since the default name for a bean is the
29142915
fully-qualified name of its type, a convenient way to declare the prototype definition
29152916
is to omit the `id` attribute, as the following example shows:
29162917

src/docs/asciidoc/data-access.adoc

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1719,7 +1719,7 @@ transactional advice on the way out, you can swap the value of the profiling
17191719
aspect bean's `order` property so that it is higher than the transactional advice's
17201720
order value.
17211721

1722-
You configure additional aspects in similar fashion.
1722+
You can configure additional aspects in similar fashion.
17231723

17241724

17251725

@@ -1765,7 +1765,7 @@ The `@Transactional` annotation on a class specifies the default transaction sem
17651765
for the execution of any public method in the class.
17661766

17671767
The `@Transactional` annotation on a method within the class overrides the default
1768-
transaction semantics given by the class annotation (if present). You can annotation any method,
1768+
transaction semantics given by the class annotation (if present). You can annotate any method,
17691769
regardless of visibility.
17701770

17711771
To weave your applications with the `AnnotationTransactionAspect`, you must either build
@@ -2133,14 +2133,14 @@ specific to each technology.
21332133
[[dao-exceptions]]
21342134
=== Consistent Exception Hierarchy
21352135

2136-
Spring provides a convenient translation from technology-specific exceptions,, such as
2136+
Spring provides a convenient translation from technology-specific exceptions, such as
21372137
`SQLException` to its own exception class hierarchy, which has `DataAccessException` as
21382138
the root exception. These exceptions wrap the original exception so that there is never any
21392139
risk that you might lose any information about what might have gone wrong.
21402140

21412141
In addition to JDBC exceptions, Spring can also wrap JPA- and Hibernate-specific exceptions,
21422142
converting them to a set of focused runtime exceptions.
2143-
This lets you handle most non-recoverablepersistence exceptions
2143+
This lets you handle most non-recoverable persistence exceptions
21442144
in only the appropriate layers, without having annoying boilerplate
21452145
catch-and-throw blocks and exception declarations in your DAOs. (You can still trap
21462146
and handle exceptions anywhere you need to though.) As mentioned above, JDBC
@@ -2190,7 +2190,7 @@ Any DAO or repository implementation needs access to a persistence resource,
21902190
depending on the persistence technology used. For example, a JDBC-based repository
21912191
needs access to a JDBC `DataSource`, and a JPA-based repository needs access to an
21922192
`EntityManager`. The easiest way to accomplish this is to have this resource dependency
2193-
injected by using one of the `@Autowired,`, `@Inject`, `@Resource` or `@PersistenceContext`
2193+
injected by using one of the `@Autowired`, `@Inject`, `@Resource` or `@PersistenceContext`
21942194
annotations. The following example works for a JPA repository:
21952195

21962196
====
@@ -3643,7 +3643,7 @@ layer's initialization method. For this example, the initializing method is the
36433643
you can create a new instance and set the table name by using the `withTableName` method.
36443644
Configuration methods for this class follow the `fluid` style that returns the instance
36453645
of the `SimpleJdbcInsert`, which lets you chain all configuration methods. The following
3646-
example uses only one configuration method (we shows examples of multiple methods later):
3646+
example uses only one configuration method (we show examples of multiple methods later):
36473647

36483648
====
36493649
[source,java,indent=0]
@@ -3672,7 +3672,7 @@ example uses only one configuration method (we shows examples of multiple method
36723672
----
36733673
====
36743674

3675-
The `execute` method used here takes a plain `java.utils.Map` as its only parameter. The
3675+
The `execute` method used here takes a plain `java.util.Map` as its only parameter. The
36763676
important thing to note here is that the keys used for the `Map` must match the column
36773677
names of the table, as defined in the database. This is because we read the metadata
36783678
to construct the actual insert statement.
@@ -4401,7 +4401,7 @@ example, the `StoredProcedure` class is an inner class. However, if you need to
44014401
parameters, but an output parameter is declared as a date type by using the
44024402
`SqlOutParameter` class. The `execute()` method runs the procedure and extracts the
44034403
returned date from the results `Map`. The results `Map` has an entry for each declared
4404-
output parameter (in this case, only one) byusing the parameter name as the key.
4404+
output parameter (in this case, only one) by using the parameter name as the key.
44054405
The following listing shows our custom StoredProcedure class:
44064406

44074407
====
@@ -5029,7 +5029,7 @@ inadvertently attempts to recreate additional instances of the same database. Th
50295029
happen quite easily if an XML configuration file or `@Configuration` class is responsible
50305030
for creating an embedded database and the corresponding configuration is then reused
50315031
across multiple testing scenarios within the same test suite (that is, within the same JVM
5032-
process) - for example, integration tests against embedded databases whose
5032+
process) -- for example, integration tests against embedded databases whose
50335033
`ApplicationContext` configuration differs only with regard to which bean definition
50345034
profiles are active.
50355035

@@ -5205,7 +5205,7 @@ Some suggestions for how to implement this include:
52055205
* Have your cache or a separate component that initializes the cache implement
52065206
`Lifecycle` or `SmartLifecycle`. When the application context starts, you can
52075207
automatically start a `SmartLifecycle` by setting its `autoStartup` flag, and you can
5208-
manually start a `Lifecycle`by calling `ConfigurableApplicationContext.start()`
5208+
manually start a `Lifecycle` by calling `ConfigurableApplicationContext.start()`
52095209
on the enclosing context.
52105210
* Use a Spring `ApplicationEvent` or similar custom observer mechanism to trigger the
52115211
cache initialization. `ContextRefreshedEvent` is always published by the context when
@@ -5593,7 +5593,7 @@ focus on adding business logic, which is the real value of your application.
55935593
NOTE: Before you continue, we are strongly encourage you to read <<transaction-declarative>>
55945594
if you have not already done so.
55955595

5596-
You cN annotate the service layer with `@Transactional` annotations and instruct the
5596+
You can annotate the service layer with `@Transactional` annotations and instruct the
55975597
Spring container to find these annotations and provide transactional semantics for
55985598
these annotated methods. The following example shows how to do so:
55995599

@@ -6355,7 +6355,7 @@ a non-invasiveness perspective and can feel more natural to JPA developers.
63556355
[[orm-jpa-tx]]
63566356
==== Spring-driven JPA transactions
63576357

6358-
NOTE: We strongly encourag you to read <<transaction-declarative>>, if you have not already done
6358+
NOTE: We strongly encourage you to read <<transaction-declarative>>, if you have not already done
63596359
so, to get more detailed coverage of Spring's declarative transaction support.
63606360

63616361
The recommended strategy for JPA is local transactions through JPA's native transaction
@@ -6635,7 +6635,7 @@ wraps a different XML representation, as the following table indicates:
66356635
| `java.io.File`, `java.io.InputStream`, or `java.io.Reader`
66366636
|===
66376637

6638-
Even though there are two separate marshalling interfaces ( `Marshaller` and
6638+
Even though there are two separate marshalling interfaces (`Marshaller` and
66396639
`Unmarshaller`), all implementations in Spring-WS implement both in one class.
66406640
This means that you can wire up one marshaller class and refer to it both as a
66416641
marshaller and as an unmarshaller in your `applicationContext.xml`.

0 commit comments

Comments
 (0)