Using the "quotes" substitution group by default leads to side effect
when the "*" character is used. This is especially true for AOP pointcut
or for MVC mappings.
Plain verbatim might work most of the time unless you intend to highlight
a piece of code or a comment.
Issue: SPR-12456
@ -9565,7 +9565,7 @@ a resource points to just one resource at a time.
@@ -9565,7 +9565,7 @@ a resource points to just one resource at a time.
When the path location contains an Ant-style pattern, for example:
[literal]
[subs="verbatim,quotes"]
[subs="verbatim"]
----
/WEB-INF/*-context.xml
com/mycompany/**/applicationContext.xml
@ -9833,7 +9833,7 @@ Implementing a `Validator` is fairly straightforward, especially when you know o
@@ -9833,7 +9833,7 @@ Implementing a `Validator` is fairly straightforward, especially when you know o
`ValidationUtils` helper class that the Spring Framework also provides.
[source,java,indent=0]
[subs="verbatim,quotes"]
[subs="verbatim"]
----
public class PersonValidator implements Validator {
@ -13510,16 +13510,16 @@ execution is in the trading module), and `tradingOperation` (which matches if a
@@ -13510,16 +13510,16 @@ execution is in the trading module), and `tradingOperation` (which matches if a
execution represents any public method in the trading module).
[source,java,indent=0]
[subs="verbatim,quotes"]
[subs="verbatim"]
----
@Pointcut("execution(public * *(..))")
private void anyPublicOperation() {}
private void anyPublicOperation() {}
@Pointcut("within(com.xyz.someapp.trading..*)")
private void inTrading() {}
@Pointcut("within(com.xyz.someapp.trading..*)")
private void inTrading() {}
@Pointcut("anyPublicOperation() && inTrading()")
private void tradingOperation() {}
@Pointcut("anyPublicOperation() && inTrading()")
private void tradingOperation() {}
----
It is a best practice to build more complex pointcut expressions out of smaller named
@ -13537,7 +13537,7 @@ defining a "SystemArchitecture" aspect that captures common pointcut expressions
@@ -13537,7 +13537,7 @@ defining a "SystemArchitecture" aspect that captures common pointcut expressions
this purpose. A typical such aspect would look as follows:
[source,java,indent=0]
[subs="verbatim,quotes"]
[subs="verbatim"]
----
package com.xyz.someapp;
@ -13654,7 +13654,7 @@ Some examples of common pointcut expressions are given below.
@@ -13654,7 +13654,7 @@ Some examples of common pointcut expressions are given below.
* the execution of any public method:
[source,java,indent=0]
[subs="verbatim,quotes"]
[subs="verbatim"]
----
execution(public * *(..))
----
@ -13662,7 +13662,7 @@ Some examples of common pointcut expressions are given below.
@@ -13662,7 +13662,7 @@ Some examples of common pointcut expressions are given below.
* the execution of any method with a name beginning with "set":
[source,java,indent=0]
[subs="verbatim,quotes"]
[subs="verbatim"]
----
execution(* set*(..))
----
@ -13670,7 +13670,7 @@ Some examples of common pointcut expressions are given below.
@@ -13670,7 +13670,7 @@ Some examples of common pointcut expressions are given below.
* the execution of any method defined by the `AccountService` interface:
[source,java,indent=0]
[subs="verbatim,quotes"]
[subs="verbatim"]
----
execution(* com.xyz.service.AccountService.*(..))
----
@ -13678,7 +13678,7 @@ Some examples of common pointcut expressions are given below.
@@ -13678,7 +13678,7 @@ Some examples of common pointcut expressions are given below.
* the execution of any method defined in the service package:
[source,java,indent=0]
[subs="verbatim,quotes"]
[subs="verbatim"]
----
execution(* com.xyz.service.*.*(..))
----
@ -13686,7 +13686,7 @@ Some examples of common pointcut expressions are given below.
@@ -13686,7 +13686,7 @@ Some examples of common pointcut expressions are given below.
* the execution of any method defined in the service package or a sub-package:
[source,java,indent=0]
[subs="verbatim,quotes"]
[subs="verbatim"]
----
execution(* com.xyz.service..*.*(..))
----
@ -13905,7 +13905,7 @@ Before advice is declared in an aspect using the `@Before` annotation:
@@ -13905,7 +13905,7 @@ Before advice is declared in an aspect using the `@Before` annotation:
If using an in-place pointcut expression we could rewrite the above example as:
[source,java,indent=0]
[subs="verbatim,quotes"]
[subs="verbatim"]
----
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
@ -14234,7 +14234,7 @@ You can restrict interception of method types to certain parameter types by simp
@@ -14234,7 +14234,7 @@ You can restrict interception of method types to certain parameter types by simp
typing the advice parameter to the parameter type you want to intercept the method for:
@ -14247,7 +14247,7 @@ pointing out that this won't work for generic collections. So you cannot define
@@ -14247,7 +14247,7 @@ pointing out that this won't work for generic collections. So you cannot define
public void beforeSampleMethod(Collection<MyType> param) {
@ -14655,7 +14655,7 @@ A pointcut representing the execution of any business service in the service lay
@@ -14655,7 +14655,7 @@ A pointcut representing the execution of any business service in the service lay
be defined as follows:
[source,xml,indent=0]
[subs="verbatim,quotes"]
[subs="verbatim"]
----
<aop:config>
@ -14687,7 +14687,7 @@ Assuming you have a `SystemArchitecture` aspect as described in <<aop-common-poi
@@ -14687,7 +14687,7 @@ Assuming you have a `SystemArchitecture` aspect as described in <<aop-common-poi
Declaring a pointcut inside an aspect is very similar to declaring a top-level pointcut:
[source,xml,indent=0]
[subs="verbatim,quotes"]
[subs="verbatim"]
----
<aop:config>
@ -14708,7 +14708,7 @@ definition style may collect join point context. For example, the following poin
@@ -14708,7 +14708,7 @@ definition style may collect join point context. For example, the following poin
collects the 'this' object as the join point context and passes it to advice:
[source,xml,indent=0]
[subs="verbatim,quotes"]
[subs="verbatim"]
----
<aop:config>
@ -14742,7 +14742,7 @@ the keywords 'and', 'or' and 'not' can be used in place of '&&', '||' and '!'
@@ -14742,7 +14742,7 @@ the keywords 'and', 'or' and 'not' can be used in place of '&&', '||' and '!'
respectively. For example, the previous pointcut may be better written as:
[source,xml,indent=0]
[subs="verbatim,quotes"]
[subs="verbatim"]
----
<aop:config>
@ -14795,7 +14795,7 @@ level. To define the pointcut inline instead, replace the `pointcut-ref` attribu
@@ -14795,7 +14795,7 @@ level. To define the pointcut inline instead, replace the `pointcut-ref` attribu
a `pointcut` attribute:
[source,xml,indent=0]
[subs="verbatim,quotes"]
[subs="verbatim"]
----
<aop:aspect id="beforeExample" ref="aBean">
@ -15205,7 +15205,7 @@ commonly see it used in conjunction with transactional advice, which also has it
@@ -15205,7 +15205,7 @@ commonly see it used in conjunction with transactional advice, which also has it
@ -15349,7 +15349,7 @@ change to the aspect to retry only idempotent operations simply involves refinin
@@ -15349,7 +15349,7 @@ change to the aspect to retry only idempotent operations simply involves refinin
pointcut expression so that only `@Idempotent` operations match:
[source,xml,indent=0]
[subs="verbatim,quotes"]
[subs="verbatim"]
----
<aop:pointcut id="idempotentOperation"
expression="execution(* com.xyz.myapp.service.*.*(..)) and
@ -15416,22 +15416,22 @@ named pointcuts declared in XML. For example, in the @AspectJ style you can writ
@@ -15416,22 +15416,22 @@ named pointcuts declared in XML. For example, in the @AspectJ style you can writ
In the XML style I can declare the first two pointcuts:
[source,xml,indent=0]
[subs="verbatim,quotes"]
[subs="verbatim"]
----
<aop:pointcut id="propertyAccess"
expression="execution(* get*())"/>
@ -16083,7 +16083,7 @@ Here is the profiling aspect. Nothing too fancy, just a quick-and-dirty time-bas
@@ -16083,7 +16083,7 @@ Here is the profiling aspect. Nothing too fancy, just a quick-and-dirty time-bas
profiler, using the @AspectJ-style of aspect declaration.
[source,java,indent=0]
[subs="verbatim,quotes"]
[subs="verbatim"]
----
package foo;
@ -16750,7 +16750,7 @@ effectively the union of these pointcuts.)
@@ -16750,7 +16750,7 @@ effectively the union of these pointcuts.)
@ -16770,7 +16770,7 @@ Using `RegexpMethodPointcutAdvisor` simplifies wiring, as the one bean encapsula
@@ -16770,7 +16770,7 @@ Using `RegexpMethodPointcutAdvisor` simplifies wiring, as the one bean encapsula
@ -23202,7 +23202,7 @@ execute in the context of a transaction with read-write semantics. The following
@@ -23202,7 +23202,7 @@ execute in the context of a transaction with read-write semantics. The following
configuration is explained in detail in the next few paragraphs.
[source,xml,indent=0]
[subs="verbatim,quotes"]
[subs="verbatim"]
----
<!-- from the file 'context.xml' -->
<?xml version="1.0" encoding="UTF-8"?>
@ -23291,7 +23291,7 @@ do this is simply to change the pointcut expression to match any operation in yo
@@ -23291,7 +23291,7 @@ do this is simply to change the pointcut expression to match any operation in yo
@ -23468,7 +23468,7 @@ defined in that package (or in subpackages) and that have names ending in `Servi
@@ -23468,7 +23468,7 @@ defined in that package (or in subpackages) and that have names ending in `Servi
the default transactional configuration, you would write the following:
@ -23516,7 +23516,7 @@ The following example shows how to configure two distinct beans with totally dif
@@ -23516,7 +23516,7 @@ The following example shows how to configure two distinct beans with totally dif
@ -24130,7 +24130,7 @@ is controlled through the `Ordered` interface. For full details on advice orderi
@@ -24130,7 +24130,7 @@ is controlled through the `Ordered` interface. For full details on advice orderi
@ -24186,7 +24186,7 @@ The following example effects the same setup as above, but uses the purely XML
@@ -24186,7 +24186,7 @@ The following example effects the same setup as above, but uses the purely XML
@ -26654,7 +26654,7 @@ where it's simply called `execute`. However, you don't have to subclass the `Sql
@@ -26654,7 +26654,7 @@ where it's simply called `execute`. However, you don't have to subclass the `Sql
class since it can easily be parameterized by setting SQL and declaring parameters.
[source,java,indent=0]
[subs="verbatim,quotes"]
[subs="verbatim"]
----
import java.sql.Types;
@ -27727,7 +27727,7 @@ The following example shows how you can configure an AOP transaction interceptor
@@ -27727,7 +27727,7 @@ The following example shows how you can configure an AOP transaction interceptor
@ -27949,7 +27949,7 @@ across any number of DAOs and any number of session factories without special re
@@ -27949,7 +27949,7 @@ across any number of DAOs and any number of session factories without special re
long as it is using `JtaTransactionManager` as the strategy.
[source,xml,indent=0]
[subs="verbatim,quotes"]
[subs="verbatim"]
----
<beans>
@ -28368,7 +28368,7 @@ To execute service operations within transactions, you can use Spring's common
@@ -28368,7 +28368,7 @@ To execute service operations within transactions, you can use Spring's common
@ -28682,7 +28682,7 @@ parsed and later retrieved through the persistence unit name. (By default, the c
@@ -28682,7 +28682,7 @@ parsed and later retrieved through the persistence unit name. (By default, the c
is searched for `META-INF/persistence.xml` files.)
@ -28868,7 +28868,7 @@ To execute service operations within transactions, you can use Spring's common
@@ -28868,7 +28868,7 @@ To execute service operations within transactions, you can use Spring's common
@ -29008,7 +29008,7 @@ Spring abstracts all marshalling operations behind the
@@ -29008,7 +29008,7 @@ Spring abstracts all marshalling operations behind the
below.
[source,java,indent=0]
[subs="verbatim,quotes"]
[subs="verbatim"]
----
public interface Marshaller {
@ -29056,7 +29056,7 @@ Similar to the `Marshaller`, there is the `org.springframework.oxm.Unmarshaller`
@@ -29056,7 +29056,7 @@ Similar to the `Marshaller`, there is the `org.springframework.oxm.Unmarshaller`
interface.
[source,java,indent=0]
[subs="verbatim,quotes"]
[subs="verbatim"]
----
public interface Unmarshaller {
@ -32463,7 +32463,7 @@ One issue with the `Accept` header is that it is impossible to set it in a web b
@@ -32463,7 +32463,7 @@ One issue with the `Accept` header is that it is impossible to set it in a web b
within HTML. For example, in Firefox, it is fixed to:
@ -32906,7 +32906,7 @@ a request for the following URL, `http://www.sf.net/home.view?siteLanguage=nl` w
@@ -32906,7 +32906,7 @@ a request for the following URL, `http://www.sf.net/home.view?siteLanguage=nl` w
@ -34040,7 +34040,7 @@ incoming requests or restricted to specific URL path patterns.
@@ -34040,7 +34040,7 @@ incoming requests or restricted to specific URL path patterns.
An example of registering interceptors in Java:
[source,java,indent=0]
[subs="verbatim,quotes"]
[subs="verbatim"]
----
@Configuration
@EnableWebMvc
@ -34059,7 +34059,7 @@ An example of registering interceptors in Java:
@@ -34059,7 +34059,7 @@ An example of registering interceptors in Java:
@ -34290,7 +34290,7 @@ to serve resource requests with a URL pattern of `/resources/**` from a
@@ -34290,7 +34290,7 @@ to serve resource requests with a URL pattern of `/resources/**` from a
`public-resources` directory within the web application root you would use:
[source,java,indent=0]
[subs="verbatim,quotes"]
[subs="verbatim"]
----
@Configuration
@EnableWebMvc
@ -34307,7 +34307,7 @@ to serve resource requests with a URL pattern of `/resources/**` from a
@@ -34307,7 +34307,7 @@ to serve resource requests with a URL pattern of `/resources/**` from a
@ -34316,7 +34316,7 @@ To serve these resources with a 1-year future expiration to ensure maximum use o
@@ -34316,7 +34316,7 @@ To serve these resources with a 1-year future expiration to ensure maximum use o
browser cache and a reduction in HTTP requests made by the browser:
[source,java,indent=0]
[subs="verbatim,quotes"]
[subs="verbatim"]
----
@Configuration
@EnableWebMvc
@ -34333,7 +34333,7 @@ browser cache and a reduction in HTTP requests made by the browser:
@@ -34333,7 +34333,7 @@ browser cache and a reduction in HTTP requests made by the browser:
@ -34347,7 +34347,7 @@ serving of resources from both the web application root and from a known path of
@@ -34347,7 +34347,7 @@ serving of resources from both the web application root and from a known path of
`/META-INF/public-web-resources/` in any jar on the classpath use:
[source,java,indent=0]
[subs="verbatim,quotes"]
[subs="verbatim"]
----
@EnableWebMvc
@Configuration
@ -34393,7 +34393,7 @@ caching should be enabled in production.
@@ -34393,7 +34393,7 @@ caching should be enabled in production.
@ -47274,7 +47274,7 @@ example the following task is being scheduled to run 15 minutes past each hour b
@@ -47274,7 +47274,7 @@ example the following task is being scheduled to run 15 minutes past each hour b
during the 9-to-5 "business hours" on weekdays.
[source,java,indent=0]
[subs="verbatim,quotes"]
[subs="verbatim"]
----
scheduler.schedule(task, new CronTrigger("* 15 9-17 * * MON-FRI"));
----
@ -47401,7 +47401,7 @@ If simple periodic scheduling is not expressive enough, then a cron expression m
@@ -47401,7 +47401,7 @@ If simple periodic scheduling is not expressive enough, then a cron expression m
provided. For example, the following will only execute on weekdays.
[source,java,indent=0]
[subs="verbatim,quotes"]
[subs="verbatim"]
----
@Scheduled(cron="*/5 * * * * MON-FRI")
public void doSomething() {
@ -47708,7 +47708,7 @@ before the first execution of the method. For more control, a "cron" attribute m
@@ -47708,7 +47708,7 @@ before the first execution of the method. For more control, a "cron" attribute m
provided instead. Here is an example demonstrating these other options.
@ -47758,7 +47758,7 @@ case, if the `ExampleJob` contains a bean property named `timeout`, the `JobDeta
@@ -47758,7 +47758,7 @@ case, if the `ExampleJob` contains a bean property named `timeout`, the `JobDeta
will have it applied automatically:
[source,java,indent=0]
[subs="verbatim,quotes"]
[subs="verbatim"]
----
package example;
@ -47875,7 +47875,7 @@ those triggers.
@@ -47875,7 +47875,7 @@ those triggers.