Spring模塊有一個@Cacheable註釋:緩存與Spring框架
org.springmodules.cache.annotations.Cacheable
既然彈簧組件已過時,什麼是緩存的建議?仍然可以使用ehCache?
Spring模塊有一個@Cacheable註釋:緩存與Spring框架
org.springmodules.cache.annotations.Cacheable
既然彈簧組件已過時,什麼是緩存的建議?仍然可以使用ehCache?
彈簧模塊的用戶已經被遺漏在肢體上。我沒有直接替換我知道的@Cacheable
。儘管如此,Spring的確對EhCache有一定的支持,其形式爲EhCacheFactoryBean
和相關類(參見javadoc)。這爲創建和管理EhCache實例提供了一種非常簡單的方法,但是您必須手動使用它。
這個項目的目的是作爲一個直接替換:http://code.google.com/p/ehcache-spring-annotations/
現在這是在春天上下文中找到。我沒有檢查它有多遠,但它在4.1.4.RELEASE中。
\ org \ springframework \ cache \ annotation \
http://code.google.com/p/ehcache-spring-annotations/是針對spring-module緩存註釋的ehcache特定替換。 – Eric 2011-04-12 20:19:43