@@ -5396,6 +5396,7 @@ You can use these macros instead of the six-digit value, thus: `@Scheduled(cron
5396
5396
|===
5397
5397
5398
5398
5399
+
5399
5400
[[scheduling-quartz]]
5400
5401
=== Using the Quartz Scheduler
5401
5402
@@ -5451,7 +5452,6 @@ has it applied automatically:
5451
5452
protected void executeInternal(JobExecutionContext ctx) throws JobExecutionException {
5452
5453
// do the actual work
5453
5454
}
5454
-
5455
5455
}
5456
5456
----
5457
5457
@@ -5571,11 +5571,19 @@ seconds and one running every morning at 6 AM. To finalize everything, we need t
5571
5571
</bean>
5572
5572
----
5573
5573
5574
- More properties are available for the `SchedulerFactoryBean`, such as the calendars
5575
- used by the job details, properties to customize Quartz with, and others . See the
5576
- {api-spring-framework}/scheduling/quartz/SchedulerFactoryBean.html[`SchedulerFactoryBean`]
5574
+ More properties are available for the `SchedulerFactoryBean`, such as the calendars used by the
5575
+ job details, properties to customize Quartz with, and a Spring-provided JDBC DataSource . See
5576
+ the {api-spring-framework}/scheduling/quartz/SchedulerFactoryBean.html[`SchedulerFactoryBean`]
5577
5577
javadoc for more information.
5578
5578
5579
+ NOTE: `SchedulerFactoryBean` also recognizes a `quartz.properties` file in the classpath,
5580
+ based on Quartz property keys, as with regular Quartz configuration. Please note that many
5581
+ `SchedulerFactoryBean` settings interact with common Quartz settings in the properties file;
5582
+ it is therefore not recommended to specify values at both levels. For example, do not set
5583
+ an "org.quartz.jobStore.class" property if you mean to rely on a Spring-provided DataSource,
5584
+ or specify an `org.springframework.scheduling.quartz.LocalDataSourceJobStore` variant which
5585
+ is a full-fledged replacement for the standard `org.quartz.impl.jdbcjobstore.JobStoreTX`.
5586
+
5579
5587
5580
5588
5581
5589
@@ -5877,7 +5885,6 @@ is updated in the cache. The following example shows how to use the `sync` attri
5877
5885
----
5878
5886
<1> Using the `sync` attribute.
5879
5887
5880
-
5881
5888
NOTE: This is an optional feature, and your favorite cache library may not support it.
5882
5889
All `CacheManager` implementations provided by the core framework support it. See the
5883
5890
documentation of your cache provider for more details.
@@ -6035,7 +6042,6 @@ all entries from the `books` cache:
6035
6042
----
6036
6043
<1> Using the `allEntries` attribute to evict all entries from the cache.
6037
6044
6038
-
6039
6045
This option comes in handy when an entire cache region needs to be cleared out.
6040
6046
Rather than evicting each entry (which would take a long time, since it is inefficient),
6041
6047
all the entries are removed in one operation, as the preceding example shows.
@@ -6094,7 +6100,6 @@ comes into play. The following examples uses `@CacheConfig` to set the name of t
6094
6100
----
6095
6101
<1> Using `@CacheConfig` to set the name of the cache.
6096
6102
6097
-
6098
6103
`@CacheConfig` is a class-level annotation that allows sharing the cache names,
6099
6104
the custom `KeyGenerator`, the custom `CacheManager`, and the custom `CacheResolver`.
6100
6105
Placing this annotation on the class does not turn on any caching operation.
@@ -6235,13 +6240,11 @@ if you need to annotate non-public methods, as it changes the bytecode itself.
6235
6240
****
6236
6241
6237
6242
TIP: Spring recommends that you only annotate concrete classes (and methods of concrete
6238
- classes) with the `@Cache{asterisk}` annotation, as opposed to annotating interfaces.
6239
- You certainly can place the `@Cache{asterisk}` annotation on an interface (or an interface
6240
- method), but this works only as you would expect it to if you use interface-based proxies.
6241
- The fact that Java annotations are not inherited from interfaces means that, if you use
6242
- class-based proxies (`proxy-target-class="true"`) or the weaving-based aspect
6243
- (`mode="aspectj"`), the caching settings are not recognized by the proxying and weaving
6244
- infrastructure, and the object is not wrapped in a caching proxy.
6243
+ classes) with the `@Cache{asterisk}` annotations, as opposed to annotating interfaces.
6244
+ You certainly can place an `@Cache{asterisk}` annotation on an interface (or an interface
6245
+ method), but this works only if you use the proxy mode (`mode="proxy"`). If you use the
6246
+ weaving-based aspect (`mode="aspectj"`), the caching settings are not recognized on
6247
+ interface-level declarations by the weaving infrastructure.
6245
6248
6246
6249
NOTE: In proxy mode (the default), only external method calls coming in through the
6247
6250
proxy are intercepted. This means that self-invocation (in effect, a method within the
@@ -6378,7 +6381,6 @@ to customize the factory for each cache operation, as the following example show
6378
6381
----
6379
6382
<1> Customizing the factory for this operation.
6380
6383
6381
-
6382
6384
NOTE: For all referenced classes, Spring tries to locate a bean with the given type.
6383
6385
If more than one match exists, a new instance is created and can use the regular
6384
6386
bean lifecycle callbacks, such as dependency injection.
0 commit comments