jeeplus-boot 用redis+注解实现session持久化

分享 未结 182
YANZI
YANZI VIP4 2019-11-21 16:10:02   最后修改:2019-11-21 16:44:38
收藏
1.POM文件 [pre] <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> </dependency> <dependency> <groupId>org.springframework.session</groupId> <artifactId>spring-session-data-redis</artifactId> </dependency> [/pre] 2.启动类修改 @EnableRedisHttpSession img[/userfiles/fly/d8609ed5bf6d47ffa7b40e87473f7dff/files/1574323712762.] 注意yml改用redis启动,并且本机开启redis服务 img[/userfiles/fly/d8609ed5bf6d47ffa7b40e87473f7dff/files/1574323798598.]
回帖
  • 消灭零回复