在使用之前,請確認專案已經整合了Redis
一、加入依賴
<dependency> <groupId>org.springframework.session</groupId> <artifactId>spring-session-data-redis</artifactId> </dependency>
二、加入注解
在加了@SpringBootApplication注解的類加上以下注解
@EnableRedisHttpSession
沒了,,,,
至于版本在阿里云倉庫搜索就行
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/29474.html
標籤:NoSQL
上一篇:mongodb 簡單的增刪改查
