Force a single session or allow multiple Remote Desktop sessions per user

To change this setting, you'll need to perform a registry change. The following steps describe the process:


1.Start Registry Editor (by default, this is located at c:\windows\regedit.exe).
2.Go to the following registry key:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer
3.If the fSingleSessionPerUser value doesn't exist, create a new DWORD value named fSingleSessionPerUser
4.Open the fSingleSessionPerUser value. The possible values for this setting are as follows: 0x0Allow multiple sessions per user 0x1Force each user to a single session
5.Enter the new setting, and then click OK.

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Spring Session 是一个用于管理 Web 应用会话的框架,它提供了一种将会话信息存储在外部存储介质中的方法,以便多个应用程序实例可以共享相同的会话数据。在 Spring Session 中,会话的过期时间是通过在 Redis/数据库等外部存储介质中设置相应的 key 的过期时间来实现的。 具体来说,在 Spring Session 中,会话数据被存储在外部存储介质中的某个 key 下。而 key 的过期时间是由外部存储介质来维护的。例如,在 Redis 中,可以使用 `EXPIRE` 命令来设置 key 的过期时间;在数据库中,可以使用类似 `DELETE FROM session WHERE expire_time < NOW()` 的 SQL 语句来删除已经过期的会话数据。 在 Spring Session 中,会话过期时间的配置是在 `spring:session:sessions:expires` 属性中进行的。这个属性可以通过 Spring Boot 的配置文件或者通过 Java 代码来配置。具体来说,当 `spring:session:sessions:expires` 属性被配置为一个正整数时,表示会话的过期时间为该正整数所表示的秒数。当这个属性被配置为 `-1` 时,表示会话永不过期。 在 Spring Session 的源码中,会话过期时间的处理是在 `org.springframework.session.data.redis.RedisOperationsSessionRepository` 类中完成的。具体来说,在 `RedisOperationsSessionRepository` 类中,会话数据被存储在 Redis 中的一个 key 下,而 key 的过期时间是通过调用 `RedisOperations#expire` 方法来设置的。在 `RedisOperationsSessionRepository` 类的 `afterPropertiesSet` 方法中,会根据 `spring:session:sessions:expires` 属性的值来设置 Redis 中 key 的过期时间。如果 `spring:session:sessions:expires` 属性的值为正整数,则会将 Redis 中 key 的过期时间设置为该正整数所表示的秒数;如果 `spring:session:sessions:expires` 属性的值为 `-1`,则会将 Redis 中 key 的过期时间设置为 0,表示该 key 永不过期。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值