-
Notifications
You must be signed in to change notification settings - Fork 41.2k
@Cacheable not working on interface method in Spring Boot 1.4.2+ #8331
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for the sample but I've built something that is more reasonable based on yours (you really do not need a redis store to reproduce this issue!) https://github.com/snicoll-scratches/test-cache-interface The mix between annotations on interface and concrete classes is not something we recommend doing but I can confirm that adding the JPA starter is enough to trigger the problem. It works with Spring Boot If I upgrade the spring framework version to use with |
Thanks @snicoll We are using |
Ah that makes sense, thanks for clarifying. |
We use Spring cache annotation
This used to work well till Spring Boot 1.4.1 and the interface methods are annotated, since after upgrading to Spring Boot 1.4.3 & also tried the same on 1.4.4 the interface annotated methods have stopped working.
After digging deeper, we found it stops working with Spring Data JPA
If you exclude this repo, it starts working on interface methods.
This is the sample repo, to reproduce the issue https://github.com/ahmednasir91/spring-cache-test
The project has 3 branches
master
SB v1.4.4 & Data JPA commented - Caching works on interface methodscache-not-working
SB 1.4.4, Data JPA enabled - Caching doesn't work for interface methodworking-boot-1.4.1
SB 1.4.1 Data JPA enabled - Caching works on interface methodsFollowing are the APIs
The text was updated successfully, but these errors were encountered: