SonivelY
V2EX  ›  问与答

shiro 怎么通过 sessionid 获取 Session 对象

  •  
  •   SonivelY · Oct 14, 2019 · 3037 views
    This topic created in 2585 days ago, the information mentioned may be changed or developed.
    2 replies  •  2019-11-01 15:15:08 +08:00
    Aruforce
    Aruforce
    Oct 14, 2019 via Android
    1
    你是认真的?
    wizzer
    wizzer
    Nov 1, 2019
    2
    ```
    Subject.Builder builder = new Subject.Builder(SecurityUtils.getSecurityManager());
    builder.sessionId(sessionId);
    ThreadContext.bind(builder.buildSubject());
    ```
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2406 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 04:51 · PVG 12:51 · LAX 20:51 · JFK 23:51
    ♥ Do have faith in what you're doing.