@@ -6001,7 +6001,7 @@ along with an inline image.
60016001 helper.setTo("[email protected] "); 60026002
60036003 // 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);
60056005
60066006 // let's include the infamous windows Sample file (this time copied to c:/)
60076007 FileSystemResource res = new FileSystemResource(new File("c:/Sample.jpg"));
@@ -6492,7 +6492,7 @@ reference is provided for managing those methods annotated with `@Scheduled`.
64926492
64936493[[scheduling-annotation-support-scheduled]]
64946494==== 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
64966496example, the following method would be invoked every 5 seconds with a fixed delay,
64976497meaning that the period will be measured from the completion time of each preceding
64986498invocation.
@@ -6556,13 +6556,13 @@ Context, then those would typically have been provided through dependency inject
65566556
65576557[NOTE]
65586558====
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`
65606560annotation 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.
65666566====
65676567
65686568
@@ -6613,8 +6613,8 @@ asynchronous execution so that the caller can perform other tasks prior to calli
66136613----
66146614
66156615`@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
66186618target then.
66196619
66206620[source,java,indent=0]
@@ -6629,7 +6629,7 @@ target then.
66296629
66306630 }
66316631
6632- public class SampleBeanInititalizer {
6632+ public class SampleBeanInitializer {
66336633
66346634 private final SampleBean bean;
66356635
@@ -6645,6 +6645,14 @@ target then.
66456645 }
66466646----
66476647
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+
66486656
66496657
66506658[[scheduling-annotation-support-qualification]]
@@ -7360,7 +7368,7 @@ message is surrounded by quotes. Below are the changes that I (the author) make
73607368
73617369 public String getMessage() {
73627370 // change the implementation to surround the message in quotes
7363- return "'' " + this.message + "' '"
7371+ return "'" + this.message + "'"
73647372 }
73657373
73667374 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
77677775 DelegatingMetaClass metaClass = new DelegatingMetaClass(goo.getMetaClass()) {
77687776
77697777 public Object invokeMethod(Object object, String methodName, Object[] arguments) {
7770- System.out.println("Invoking '' " + methodName + "' '.");
7778+ System.out.println("Invoking '" + methodName + "'.");
77717779 return super.invokeMethod(object, methodName, arguments);
77727780 }
77737781 };
@@ -8814,7 +8822,7 @@ up its declaration at runtime and understands its meaning. Note that as mentione
88148822=== JCache (JSR-107) annotations
88158823
88168824Since 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
88188826`@CacheRemoveAll` as well as the `@CacheDefaults`, `@CacheKey` and `@CacheValue`
88198827companions. These annotations can be used right the way without migrating your
88208828cache 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
89969004
89979005[[cache-store-configuration]]
89989006=== 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
90009008them, one needs to simply declare an appropriate `CacheManager` - an entity that
90019009controls and manages ++Cache++s and can be used to retrieve these for storage.
90029010
0 commit comments