java - session synchronization problem in dubbo
伊谢尔伦
伊谢尔伦 2017-06-12 09:19:17
0
3
776

The scenario is as follows. The service module and the web module in dubbo are two services. If you want to get the session in the service module, how do you get it? The web module can easily get the session because it has HttpServletRequest, but what does the service module need to do to get the session? ? After looking at spring session, the principle is to use redis to store the session, but after searching for a long time, I finally couldn’t find a specific method on how to obtain the session in the service of the service module

伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

reply all(3)
小葫芦

See if this helps: http://www.roncoo.com/course/...

某草草

You can get the request

HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
为情所困

This generally serializes the Session object and stores it in the cache. In addition, it can perform single sign-on business on a separate layer and provide an API for querying the Session (digression: this belongs to Session storage in the microservice architecture) Regarding the design of synchronization, I don’t know if the technical manager didn’t explain it clearly to you)

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template