Spring 3.1 @Cacheable - method still executed

后端 未结 3 803
盖世英雄少女心
盖世英雄少女心 2021-02-01 04:10

I\'m trying to implement Spring 3.1 caching as explained here and here, but it doesn\'t seem to be working: my method is run through every time even though it is marked @cacheab

3条回答
  •  醉梦人生
    2021-02-01 04:46

    You need to define a cache that matches the name you are referencing in you annotation ("testmethod"). Create an entry in your ehcache.xml for that cache as well.

提交回复
热议问题