@@ -6001,7 +6001,7 @@ along with an inline image.
6001
6001
helper.setTo("test@host.com");
6002
6002
6003
6003
// use the true flag to indicate the text included is HTML
6004
- helper.setText("<html><body><img src='' cid:identifier1234' '></body></html>", true);
6004
+ helper.setText("<html><body><img src='cid:identifier1234'></body></html>", true);
6005
6005
6006
6006
// let's include the infamous windows Sample file (this time copied to c:/)
6007
6007
FileSystemResource res = new FileSystemResource(new File("c:/Sample.jpg"));
@@ -6492,7 +6492,7 @@ reference is provided for managing those methods annotated with `@Scheduled`.
6492
6492
6493
6493
[[scheduling-annotation-support-scheduled]]
6494
6494
==== The @Scheduled Annotation
6495
- The @Scheduled annotation can be added to a method along with trigger metadata. For
6495
+ The ` @Scheduled` annotation can be added to a method along with trigger metadata. For
6496
6496
example, the following method would be invoked every 5 seconds with a fixed delay,
6497
6497
meaning that the period will be measured from the completion time of each preceding
6498
6498
invocation.
@@ -6556,13 +6556,13 @@ Context, then those would typically have been provided through dependency inject
6556
6556
6557
6557
[NOTE]
6558
6558
====
6559
- Make sure that you are not initializing multiple instances of the same @Scheduled
6559
+ Make sure that you are not initializing multiple instances of the same ` @Scheduled`
6560
6560
annotation class at runtime, unless you do want to schedule callbacks to each such
6561
- instance. Related to this, make sure that you do not use @Configurable on bean classes
6562
- which are annotated with @Scheduled and registered as regular Spring beans with the
6563
- container: You would get double initialization otherwise, once through the container and
6564
- once through the @Configurable aspect, with the consequence of each @Scheduled method
6565
- being invoked twice.
6561
+ instance. Related to this, make sure that you do not use ` @Configurable` on bean
6562
+ classes which are annotated with ` @Scheduled` and registered as regular Spring beans
6563
+ with the container: You would get double initialization otherwise, once through the
6564
+ container and once through the ` @Configurable` aspect, with the consequence of each
6565
+ `@Scheduled` method being invoked twice.
6566
6566
====
6567
6567
6568
6568
@@ -6613,8 +6613,8 @@ asynchronous execution so that the caller can perform other tasks prior to calli
6613
6613
----
6614
6614
6615
6615
`@Async` can not be used in conjunction with lifecycle callbacks such as
6616
- `@PostConstruct`. To asynchronously initialize Spring beans you currently have to use a
6617
- separate initializing Spring bean that invokes the `@Async` annotated method on the
6616
+ `@PostConstruct`. To asynchronously initialize Spring beans you currently have to use
6617
+ a separate initializing Spring bean that invokes the `@Async` annotated method on the
6618
6618
target then.
6619
6619
6620
6620
[source,java,indent=0]
@@ -6629,7 +6629,7 @@ target then.
6629
6629
6630
6630
}
6631
6631
6632
- public class SampleBeanInititalizer {
6632
+ public class SampleBeanInitializer {
6633
6633
6634
6634
private final SampleBean bean;
6635
6635
@@ -6645,6 +6645,14 @@ target then.
6645
6645
}
6646
6646
----
6647
6647
6648
+ [NOTE]
6649
+ ====
6650
+ There is no direct XML equivalent for `@Async` since such methods should be designed
6651
+ for asynchronous execution in the first place, not externally re-declared to be async.
6652
+ However, you may manually set up Spring's `AsyncExecutionInterceptor` with Spring AOP,
6653
+ in combination with a custom pointcut.
6654
+ ====
6655
+
6648
6656
6649
6657
6650
6658
[[scheduling-annotation-support-qualification]]
@@ -7360,7 +7368,7 @@ message is surrounded by quotes. Below are the changes that I (the author) make
7360
7368
7361
7369
public String getMessage() {
7362
7370
// change the implementation to surround the message in quotes
7363
- return "'' " + this.message + "' '"
7371
+ return "'" + this.message + "'"
7364
7372
}
7365
7373
7366
7374
public void setMessage(String message) {
@@ -7767,7 +7775,7 @@ will want to do with this callback, and you can see an example of doing that bel
7767
7775
DelegatingMetaClass metaClass = new DelegatingMetaClass(goo.getMetaClass()) {
7768
7776
7769
7777
public Object invokeMethod(Object object, String methodName, Object[] arguments) {
7770
- System.out.println("Invoking '' " + methodName + "' '.");
7778
+ System.out.println("Invoking '" + methodName + "'.");
7771
7779
return super.invokeMethod(object, methodName, arguments);
7772
7780
}
7773
7781
};
@@ -8814,7 +8822,7 @@ up its declaration at runtime and understands its meaning. Note that as mentione
8814
8822
=== JCache (JSR-107) annotations
8815
8823
8816
8824
Since the Spring Framework 4.1, the caching abstraction fully supports the JCache
8817
- standard annotations: these are `@CacheResult`, `@CacheEvict `, `@CacheRemove` and
8825
+ standard annotations: these are `@CacheResult`, `@CachePut `, `@CacheRemove` and
8818
8826
`@CacheRemoveAll` as well as the `@CacheDefaults`, `@CacheKey` and `@CacheValue`
8819
8827
companions. These annotations can be used right the way without migrating your
8820
8828
cache store to JSR-107: the internal implementation uses Spring's caching abstraction
@@ -8996,7 +9004,7 @@ we did in the example above by defining the target cache through the `cache:defi
8996
9004
8997
9005
[[cache-store-configuration]]
8998
9006
=== Configuring the cache storage
8999
- Out of the box, the cache abstraction provides several storages integration. To use
9007
+ Out of the box, the cache abstraction provides several storage integration. To use
9000
9008
them, one needs to simply declare an appropriate `CacheManager` - an entity that
9001
9009
controls and manages ++Cache++s and can be used to retrieve these for storage.
9002
9010
0 commit comments