博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
springboot spring cloud 使用spring-session共享session
阅读量:7146 次
发布时间:2019-06-29

本文共 401 字,大约阅读时间需要 1 分钟。

hot3.png

增加session共享依赖

<!--session共享 -->

<dependency>

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

<artifactId>spring-boot-starter-data-redis</artifactId>

</dependency> 

<dependency> 

<groupId>org.springframework.session</groupId>

<artifactId>spring-session</artifactId> 

</dependency>

配置redis

 

配置使用redis存储session数据

 

启动类增加@EnableRedisHttpSession开启spring-session 支持  好了完事

转载于:https://my.oschina.net/yangzg/blog/1621188

你可能感兴趣的文章
T-SQL朝花夕拾(六) Case语句
查看>>
中文特殊符号大全
查看>>
.NET Compact Framework下的Ping(ICMP)的开发
查看>>
arcgis for flex map遮罩
查看>>
设计模式之装饰模式篇(Decorator)
查看>>
为gif动画添加水印-有具体实现[2008-02-15日更新]
查看>>
hdu4288 Coder
查看>>
汽车常识全面介绍 - 悬挂系统
查看>>
ubuntu下mysql攻略
查看>>
餐饮云端
查看>>
Ajax , 好大一颗地雷啊
查看>>
黑客攻防实战入门(第三版)
查看>>
速度与激情
查看>>
DX9 HLSL Semantics
查看>>
HDU 4408 Minimum Spanning Tree(最小生成树计数)
查看>>
BZOJ 3142 数列(组合)
查看>>
csharp: word or excel Convert to PDF
查看>>
csharp: Export or Import excel using NPOI
查看>>
一起谈.NET技术,VS 2010 和 .NET 4.0 系列之《多显示器支持》篇
查看>>
“Linaro”将推动开源软件新一波开发潮
查看>>