當前位置:編程學習大全網 - 網站源碼 - spring boot cacheable在什麽情況下不生效

spring boot cacheable在什麽情況下不生效

1、功能使用註解實現,不能托管spring的地方,註解是無效的 需要註意

2、開啟緩存 @EnableCaching

3、引用 jar

<dependency>

<groupId>org.springframework.boot</groupId>

<artifactId>spring-boot-starter-cache</artifactId>

</dependency>

  • 上一篇:怎麽把壹串代碼變成二維碼?
  • 下一篇:電腦棋牌源代碼
  • copyright 2024編程學習大全網