From 9dbab116fda1bd0476dabc4c8177947088287257 Mon Sep 17 00:00:00 2001 From: Costin Leau Date: Thu, 24 Feb 2011 15:06:03 +0000 Subject: [PATCH] + add missing # to SpEL variables --- spring-framework-reference/src/cache.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/spring-framework-reference/src/cache.xml b/spring-framework-reference/src/cache.xml index 16280476c20..261e5293110 100644 --- a/spring-framework-reference/src/cache.xml +++ b/spring-framework-reference/src/cache.xml @@ -119,15 +119,15 @@ public Book findBook(ISBN isbn, boolean checkWarehouse, boolean includeUsed]]> -@Cacheable(value="book", key="isbn" +@Cacheable(value="book", key="#isbn" public Book findBook(ISBN isbn, boolean checkWarehouse, boolean includeUsed) -@Cacheable(value="book", key="isbn.rawNumber") +@Cacheable(value="book", key="#isbn.rawNumber") public Book findBook(ISBN isbn, boolean checkWarehouse, boolean includeUsed) -@Cacheable(value="book", key="T(someType).hash(isbn)") +@Cacheable(value="book", key="T(someType).hash(#isbn)") public Book findBook(ISBN isbn, boolean checkWarehouse, boolean includeUsed) The snippets above, show how easy it is to select a certain argument, one of its properties or even an arbitrary (static) method. @@ -346,13 +346,13 @@ public void loadBooks(InputStream batch)]]> Above, we have defined our own SlowService annotation which itself is annotated with @Cacheable - now we can replace the following code: - with: