bean加载顺序导致我在相应的service中使用@Cacheable不生效。
查询启动日志发现使用到的bean出现is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)。而@Cacheable是需要走代理模式的。
找到在shiro中注入的相关用户的bean,加上注解@Lazy进行延迟加载。
相同需要走代理的注解失效都有可能是这个原因导致的。