摘要:
1.分布式session问题 在高并发的情况下,每次请求Nginx的负载均衡算法会分配不同的服务器,而我们的session在某一服务器的tomcat中,这样无法维护我们的登陆状态。我们采用redis集中存储的方法来解决此问题。其逻辑为:通过uuid生成值作为cookie值返回给客户端,在后端,我们将 阅读全文
posted @ 2023-01-26 21:54
lyjps
阅读(124)
评论(0)
推荐(0)
摘要:
1.力扣338--比特位计数 class Solution { public int[] countBits(int n) { //关键在于找到递推公式 int[] res = new int[n+1]; for(int i = 1;i<=n;i++){ res[i] = res[i>>1] + ( 阅读全文
posted @ 2023-01-26 21:12
lyjps
阅读(22)
评论(0)
推荐(0)

浙公网安备 33010602011771号