JCache support is a new feature of Spring 4.1. You are using 4.0.4 which does not have this support yet.
Spring Framework 4.1 has not been released yet. You can try a snapshot by adding the following to your project
<repositories>
<repository>
<id>spring-snapshot</id>
<name>Springframework Snapshot Repository</name>
<url>http://repo.spring.io/snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
And flip the spring.version
to 4.1.0.BUILD-SNAPSHOT
I have forked your project and updated it here so that it works as it should. Checking what I've changed would help you understand what was missing.
NOTE: your JSR-107 cache manager is wrong. You should create a javax.cache.CacheManager
and once you have it you should wrap it to a Spring's CacheManager
. Keep in mind you could just as well declare any CacheManager
there and it would work (SimpleCacheManager
, GuavaCacheManager
, etc).