Skip to content

Commit 0815560

Browse files
committed
Migrate to Asciidoctor 1.5 syntax
Issue: SPR-14355
1 parent d60028c commit 0815560

13 files changed

+112
-112
lines changed

src/asciidoc/core-aop.adoc

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -398,10 +398,10 @@ releases to support more of the AspectJ pointcut designators.
398398
Because Spring AOP limits matching to only method execution join points, the discussion
399399
of the pointcut designators above gives a narrower definition than you will find in the
400400
AspectJ programming guide. In addition, AspectJ itself has type-based semantics and at
401-
an execution join point both '++this++' and '++target++' refer to the same object - the
401+
an execution join point both `this` and `target` refer to the same object - the
402402
object executing the method. Spring AOP is a proxy-based system and differentiates
403-
between the proxy object itself (bound to '++this++') and the target object behind the
404-
proxy (bound to '++target++').
403+
between the proxy object itself (bound to `this`) and the target object behind the
404+
proxy (bound to `target`).
405405

406406
[NOTE]
407407
====
@@ -418,29 +418,29 @@ different characteristics, so be sure to make yourself familiar with weaving fir
418418
before making a decision.
419419
====
420420

421-
Spring AOP also supports an additional PCD named '++bean++'. This PCD allows you to limit
421+
Spring AOP also supports an additional PCD named `bean`. This PCD allows you to limit
422422
the matching of join points to a particular named Spring bean, or to a set of named
423-
Spring beans (when using wildcards). The '++bean++' PCD has the following form:
423+
Spring beans (when using wildcards). The `bean` PCD has the following form:
424424

425425
[source,java,indent=0]
426426
[subs="verbatim,quotes"]
427427
----
428428
bean(idOrNameOfBean)
429429
----
430430

431-
The '++idOrNameOfBean++' token can be the name of any Spring bean: limited wildcard
432-
support using the '++*++' character is provided, so if you establish some naming
433-
conventions for your Spring beans you can quite easily write a '++bean++' PCD expression
434-
to pick them out. As is the case with other pointcut designators, the '++bean++' PCD can
431+
The `idOrNameOfBean` token can be the name of any Spring bean: limited wildcard
432+
support using the `*` character is provided, so if you establish some naming
433+
conventions for your Spring beans you can quite easily write a `bean` PCD expression
434+
to pick them out. As is the case with other pointcut designators, the `bean` PCD can
435435
be &&'ed, ||'ed, and ! (negated) too.
436436

437437
[NOTE]
438438
====
439-
Please note that the '++bean++' PCD is __only__ supported in Spring AOP - and __not__ in
439+
Please note that the `bean` PCD is __only__ supported in Spring AOP - and __not__ in
440440
native AspectJ weaving. It is a Spring-specific extension to the standard PCDs that
441441
AspectJ defines and therefore not available for aspects declared in the `@Aspect` model.
442442
443-
The '++bean++' PCD operates at the __instance__ level (building on the Spring bean name
443+
The `bean` PCD operates at the __instance__ level (building on the Spring bean name
444444
concept) rather than at the type level only (which is what weaving-based AOP is limited
445445
to). Instance-based pointcut designators are a special capability of Spring's
446446
proxy-based AOP framework and its close integration with the Spring bean factory, where
@@ -769,7 +769,7 @@ how to make the annotation object(s) available in the advice body.
769769
====
770770

771771
* any join point (method execution only in Spring AOP) on a Spring bean named
772-
'++tradeService++':
772+
`tradeService`:
773773

774774
[source,java,indent=0]
775775
[subs="verbatim,quotes"]
@@ -778,7 +778,7 @@ how to make the annotation object(s) available in the advice body.
778778
----
779779

780780
* any join point (method execution only in Spring AOP) on Spring beans having names that
781-
match the wildcard expression '++*Service++':
781+
match the wildcard expression `*Service`:
782782

783783
[source,java,indent=0]
784784
[subs="verbatim,quotes"]
@@ -2391,7 +2391,7 @@ In the XML style I can declare the first two pointcuts:
23912391
----
23922392

23932393
The downside of the XML approach is that you cannot define the
2394-
'++accountPropertyAccess++' pointcut by combining these definitions.
2394+
`accountPropertyAccess` pointcut by combining these definitions.
23952395

23962396
The @AspectJ style supports additional instantiation models, and richer pointcut
23972397
composition. It has the advantage of keeping the aspect as a modular unit. It also has
@@ -2467,7 +2467,7 @@ at runtime, which applies the __strongest__ proxy settings that any of the
24672467
This also applies to the `<tx:annotation-driven/>` and `<aop:aspectj-autoproxy/>`
24682468
elements.
24692469
2470-
To be clear: using '++proxy-target-class="true"++' on `<tx:annotation-driven/>`,
2470+
To be clear: using `proxy-target-class="true"` on `<tx:annotation-driven/>`,
24712471
`<aop:aspectj-autoproxy/>` or `<aop:config/>` elements will force the use of CGLIB
24722472
proxies __for all three of them__.
24732473
====
@@ -2720,7 +2720,7 @@ Spring will now look for a bean definition named "account" and use that as the
27202720
definition to configure new `Account` instances.
27212721

27222722
You can also use autowiring to avoid having to specify a dedicated bean definition at
2723-
all. To have Spring apply autowiring use the '++autowire++' property of the
2723+
all. To have Spring apply autowiring use the `autowire` property of the
27242724
`@Configurable` annotation: specify either `@Configurable(autowire=Autowire.BY_TYPE)` or
27252725
`@Configurable(autowire=Autowire.BY_NAME` for autowiring by type or by name
27262726
respectively. As an alternative, as of Spring 2.5 it is preferable to specify explicit,
@@ -2740,7 +2740,7 @@ the annotation. In essence the aspect says "after returning from the initializat
27402740
new object of a type annotated with `@Configurable`, configure the newly created object
27412741
using Spring in accordance with the properties of the annotation". In this context,
27422742
__initialization__ refers to newly instantiated objects (e.g., objects instantiated with
2743-
the '++new++' operator) as well as to `Serializable` objects that are undergoing
2743+
the `new` operator) as well as to `Serializable` objects that are undergoing
27442744
deserialization (e.g., via
27452745
http://docs.oracle.com/javase/6/docs/api/java/io/Serializable.html[readResolve()]).
27462746

@@ -2929,7 +2929,7 @@ fully-qualified class names:
29292929
When using AspectJ aspects with Spring applications, it is natural to both want and
29302930
expect to be able to configure such aspects using Spring. The AspectJ runtime itself is
29312931
responsible for aspect creation, and the means of configuring the AspectJ created
2932-
aspects via Spring depends on the AspectJ instantiation model (the '++per-xxx++' clause)
2932+
aspects via Spring depends on the AspectJ instantiation model (the `per-xxx` clause)
29332933
used by the aspect.
29342934

29352935
The majority of AspectJ aspects are __singleton__ aspects. Configuration of these
@@ -3067,10 +3067,10 @@ profiler, using the @AspectJ-style of aspect declaration.
30673067
}
30683068
----
30693069

3070-
We will also need to create an '++META-INF/aop.xml++' file, to inform the AspectJ weaver
3070+
We will also need to create an `META-INF/aop.xml` file, to inform the AspectJ weaver
30713071
that we want to weave our `ProfilingAspect` into our classes. This file convention,
30723072
namely the presence of a file (or files) on the Java classpath called
3073-
'++META-INF/aop.xml++' is standard AspectJ.
3073+
`META-INF/aop.xml` is standard AspectJ.
30743074

30753075
[source,xml,indent=0]
30763076
[subs="verbatim,quotes"]
@@ -3094,7 +3094,7 @@ namely the presence of a file (or files) on the Java classpath called
30943094
Now to the Spring-specific portion of the configuration. We need to configure a
30953095
`LoadTimeWeaver` (all explained later, just take it on trust for now). This load-time
30963096
weaver is the essential component responsible for weaving the aspect configuration in
3097-
one or more '++META-INF/aop.xml++' files into the classes in your application. The good
3097+
one or more `META-INF/aop.xml` files into the classes in your application. The good
30983098
thing is that it does not require a lot of configuration, as can be seen below (there
30993099
are some more options that you can specify, but these are detailed later).
31003100

@@ -3120,7 +3120,7 @@ are some more options that you can specify, but these are detailed later).
31203120
</beans>
31213121
----
31223122

3123-
Now that all the required artifacts are in place - the aspect, the '++META-INF/aop.xml++'
3123+
Now that all the required artifacts are in place - the aspect, the `META-INF/aop.xml`
31243124
file, and the Spring configuration -, let us create a simple driver class with a
31253125
`main(..)` method to demonstrate the LTW in action.
31263126

@@ -3157,7 +3157,7 @@ to switch on the LTW. This is the command line we will use to run the above `Mai
31573157
java -javaagent:C:/projects/foo/lib/global/spring-instrument.jar foo.Main
31583158
----
31593159

3160-
The '++-javaagent++' is a flag for specifying and enabling
3160+
The `-javaagent` is a flag for specifying and enabling
31613161
http://docs.oracle.com/javase/6/docs/api/java/lang/instrument/package-summary.html[agents
31623162
to instrument programs running on the JVM]. The Spring Framework ships with such an
31633163
agent, the `InstrumentationSavingAgent`, which is packaged in the
@@ -3235,13 +3235,13 @@ Furthermore, the compiled aspect classes need to be available on the classpath.
32353235
[[aop-aj-ltw-aop_dot_xml]]
32363236
==== 'META-INF/aop.xml'
32373237

3238-
The AspectJ LTW infrastructure is configured using one or more '++META-INF/aop.xml++'
3238+
The AspectJ LTW infrastructure is configured using one or more `META-INF/aop.xml`
32393239
files, that are on the Java classpath (either directly, or more typically in jar files).
32403240

32413241
The structure and contents of this file is detailed in the main AspectJ reference
32423242
documentation, and the interested reader is
32433243
http://www.eclipse.org/aspectj/doc/released/devguide/ltw-configuration.html[referred to
3244-
that resource]. (I appreciate that this section is brief, but the '++aop.xml++' file is
3244+
that resource]. (I appreciate that this section is brief, but the `aop.xml` file is
32453245
100% AspectJ - there is no Spring-specific information or semantics that apply to it,
32463246
and so there is no extra value that I can contribute either as a result), so rather than
32473247
rehash the quite satisfactory section that the AspectJ developers wrote, I am just
@@ -3301,7 +3301,7 @@ which typically is done using the `@EnableLoadTimeWeaving` annotation.
33013301

33023302
Alternatively, if you prefer XML based configuration, use the
33033303
`<context:load-time-weaver/>` element. Note that the element is defined in the
3304-
'++context++' namespace.
3304+
`context` namespace.
33053305

33063306
[source,xml,indent=0]
33073307
[subs="verbatim,quotes"]
@@ -3380,7 +3380,7 @@ To specify a specific `LoadTimeWeaver` with Java configuration implement the
33803380
----
33813381

33823382
If you are using XML based configuration you can specify the fully-qualified classname
3383-
as the value of the '++weaver-class++' attribute on the `<context:load-time-weaver/>`
3383+
as the value of the `weaver-class` attribute on the `<context:load-time-weaver/>`
33843384
element:
33853385

33863386
[source,xml,indent=0]
@@ -3403,7 +3403,7 @@ element:
34033403
----
34043404

34053405
The `LoadTimeWeaver` that is defined and registered by the configuration can be later
3406-
retrieved from the Spring container using the well-known name '++loadTimeWeaver++'.
3406+
retrieved from the Spring container using the well-known name `loadTimeWeaver`.
34073407
Remember that the `LoadTimeWeaver` exists just as a mechanism for Spring's LTW
34083408
infrastructure to add one or more `ClassFileTransformers`. The actual
34093409
`ClassFileTransformer` that does the LTW is the `ClassPreProcessorAgentAdapter` (from
@@ -3412,10 +3412,10 @@ the `org.aspectj.weaver.loadtime` package) class. See the class-level javadocs o
34123412
the weaving is actually effected is beyond the scope of this section.
34133413

34143414
There is one final attribute of the configuration left to discuss: the
3415-
'++aspectjWeaving++' attribute (or '++aspectj-weaving++' if you are using XML). This is a
3415+
`aspectjWeaving` attribute (or `aspectj-weaving` if you are using XML). This is a
34163416
simple attribute that controls whether LTW is enabled or not; it is as simple as that.
34173417
It accepts one of three possible values, summarized below, with the default value being
3418-
'++autodetect++' if the attribute is not present.
3418+
`autodetect` if the attribute is not present.
34193419

34203420
[[aop-aj-ltw-ltw-tag-attrs]]
34213421
.AspectJ weaving attribute values
@@ -3432,7 +3432,7 @@ It accepts one of three possible values, summarized below, with the default valu
34323432

34333433
| `AUTODETECT`
34343434
| `autodetect`
3435-
| If the Spring LTW infrastructure can find at least one '++META-INF/aop.xml++' file,
3435+
| If the Spring LTW infrastructure can find at least one `META-INF/aop.xml` file,
34363436
then AspectJ weaving is on, else it is off. This is the default value.
34373437
|===
34383438

0 commit comments

Comments
 (0)