解決 springboot 中 @Cacheable不起作用

1.application.properties中記得啓用緩存 spring.cache.type=redis 2.緩存的對象必須實現Serializable 3.SpringBootApplication中要加@EnableCaching註解 [email protected]是基於Spring AOP代理類,內部方法調用是不走代理的,@Cacheable是不起作用的
相關文章
相關標籤/搜索