Skip to content

Commit 7c94c69

Browse files
committed
Use annotation attribute aliases in examples
This commit updates examples in the reference manual to use annotation attribute aliases.
1 parent 595f9bf commit 7c94c69

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

src/asciidoc/integration.adoc

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8275,13 +8275,13 @@ do yourself a favor and read <<expressions>>:
82758275
[source,java,indent=0]
82768276
[subs="verbatim,quotes"]
82778277
----
8278-
@Cacheable(value="books", **key="#isbn"**)
8278+
@Cacheable(cacheNames="books", **key="#isbn"**)
82798279
public Book findBook(ISBN isbn, boolean checkWarehouse, boolean includeUsed)
82808280
8281-
@Cacheable(value="books", **key="#isbn.rawNumber"**)
8281+
@Cacheable(cacheNames="books", **key="#isbn.rawNumber"**)
82828282
public Book findBook(ISBN isbn, boolean checkWarehouse, boolean includeUsed)
82838283
8284-
@Cacheable(value="books", **key="T(someType).hash(#isbn)"**)
8284+
@Cacheable(cacheNames="books", **key="T(someType).hash(#isbn)"**)
82858285
public Book findBook(ISBN isbn, boolean checkWarehouse, boolean includeUsed)
82868286
----
82878287

@@ -8295,7 +8295,7 @@ this, specify the name of the `KeyGenerator` bean implementation to use:
82958295
[source,java,indent=0]
82968296
[subs="verbatim,quotes"]
82978297
----
8298-
@Cacheable(value="books", **keyGenerator="myKeyGenerator"**)
8298+
@Cacheable(cacheNames="books", **keyGenerator="myKeyGenerator"**)
82998299
public Book findBook(ISBN isbn, boolean checkWarehouse, boolean includeUsed)
83008300
----
83018301

@@ -8329,7 +8329,7 @@ to set the `cacheManager` to use per operation:
83298329
[source,java,indent=0]
83308330
[subs="verbatim,quotes"]
83318331
----
8332-
@Cacheable(value="books", **cacheManager="anotherCacheManager"**)
8332+
@Cacheable(cacheNames="books", **cacheManager="anotherCacheManager"**)
83338333
public Book findBook(ISBN isbn) {...}
83348334
----
83358335

@@ -8371,7 +8371,7 @@ only if the argument `name` has a length shorter than 32:
83718371
[source,java,indent=0]
83728372
[subs="verbatim,quotes"]
83738373
----
8374-
@Cacheable(value="book", **condition="#name.length < 32"**)
8374+
@Cacheable(cacheNames="book", **condition="#name.length < 32"**)
83758375
public Book findBook(String name)
83768376
----
83778377

@@ -8383,7 +8383,7 @@ only want to cache paperback books:
83838383
[source,java,indent=0]
83848384
[subs="verbatim,quotes"]
83858385
----
8386-
@Cacheable(value="book", condition="#name.length < 32", **unless="#result.hardback"**)
8386+
@Cacheable(cacheNames="book", condition="#name.length < 32", **unless="#result.hardback"**)
83878387
public Book findBook(String name)
83888388
----
83898389

@@ -8460,7 +8460,7 @@ than method flow optimization:
84608460
[source,java,indent=0]
84618461
[subs="verbatim,quotes"]
84628462
----
8463-
@CachePut(value="book", key="#isbn")
8463+
@CachePut(cacheNames="book", key="#isbn")
84648464
public Book updateBook(ISBN isbn, BookDescriptor descriptor)
84658465
----
84668466

@@ -8494,7 +8494,7 @@ rather then just an entry one (based on the key):
84948494
[source,java,indent=0]
84958495
[subs="verbatim,quotes"]
84968496
----
8497-
@CacheEvict(value="books", **allEntries=true**)
8497+
@CacheEvict(cacheNames="books", **allEntries=true**)
84988498
public void loadBooks(InputStream batch)
84998499
----
85008500

@@ -8533,7 +8533,7 @@ this case, `@Caching`. `@Caching` allows multiple nested `@Cacheable`, `@CachePu
85338533
[source,java,indent=0]
85348534
[subs="verbatim,quotes"]
85358535
----
8536-
@Caching(evict = { @CacheEvict("primary"), @CacheEvict(value="secondary", key="#p0") })
8536+
@Caching(evict = { @CacheEvict("primary"), @CacheEvict(cacheNames="secondary", key="#p0") })
85378537
public Book importBooks(String deposit, Date date)
85388538
----
85398539

@@ -8753,7 +8753,7 @@ that is annotations that can annotate other annotations. To wit, let us replace
87538753
----
87548754
@Retention(RetentionPolicy.RUNTIME)
87558755
@Target({ElementType.METHOD})
8756-
@Cacheable(value="books", key="#isbn")
8756+
@Cacheable(cacheNames="books", key="#isbn")
87578757
public @interface SlowService {
87588758
}
87598759
----
@@ -8764,7 +8764,7 @@ Above, we have defined our own `SlowService` annotation which itself is annotate
87648764
[source,java,indent=0]
87658765
[subs="verbatim,quotes"]
87668766
----
8767-
@Cacheable(value="books", key="#isbn")
8767+
@Cacheable(cacheNames="books", key="#isbn")
87688768
public Book findBook(ISBN isbn, boolean checkWarehouse, boolean includeUsed)
87698769
----
87708770

@@ -8846,7 +8846,7 @@ possible to customize the factory per cache operation:
88468846
[source,java,indent=0]
88478847
[subs="verbatim,quotes"]
88488848
----
8849-
@CacheResult(value="books", *cacheResolverFactory=MyCacheResolverFactory.class*)
8849+
@CacheResult(cacheNames="books", *cacheResolverFactory=MyCacheResolverFactory.class*)
88508850
public Book findBook(ISBN isbn)
88518851
----
88528852

@@ -8867,7 +8867,7 @@ abstraction and the other with JCache:
88678867
[source,java,indent=0]
88688868
[subs="verbatim,quotes"]
88698869
----
8870-
@Cacheable(value="books", **key="#isbn"**)
8870+
@Cacheable(cacheNames="books", **key="#isbn"**)
88718871
public Book findBook(ISBN isbn, boolean checkWarehouse, boolean includeUsed)
88728872
88738873
@CacheResult(cacheName="books")

src/asciidoc/web-portlet.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1295,7 +1295,7 @@ The following code snippet from the PetPortal sample application shows the usage
12951295

12961296
Parameters using this annotation are required by default, but you can specify that a
12971297
parameter is optional by setting `@RequestParam`'s `required` attribute to `false`
1298-
(e.g., `@RequestParam(value="id", required=false)`).
1298+
(e.g., `@RequestParam(name="id", required=false)`).
12991299

13001300

13011301

0 commit comments

Comments
 (0)