在使用之前,请确认项目已经整合了Redis
一、加入依赖
<dependency> <groupId>org.springframework.session</groupId> <artifactId>spring-session-data-redis</artifactId> </dependency>
二、加入注解
在加了@SpringBootApplication注解的类加上以下注解
@EnableRedisHttpSession
没了。。。。
至于版本在阿里云仓库搜索就行
<dependency> <groupId>org.springframework.session</groupId> <artifactId>spring-session-data-redis</artifactId> </dependency>
在加了@SpringBootApplication注解的类加上以下注解
@EnableRedisHttpSession
没了。。。。
至于版本在阿里云仓库搜索就行
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。