luckychen48
V2EX  ›  问与答

springboot 用户登陆怎么做啊

  •  
  •   luckychen48 · Feb 8, 2018 · 1436 views
    This topic created in 3025 days ago, the information mentioned may be changed or developed.

    之前用 jsp 可以用${name} 取出 session 的值,但是用了 spirngboot 后就是 html 页面了,怎么取 session 的值呢?

    alvinbone88
        1
    alvinbone88  
       Feb 8, 2018
    用 Spring Session 来获取 session,示例在 https://docs.spring.io/spring-session/docs/current/reference/html5/#api-session
    不过要做登录的话,建议用 Spring Security,那个基本上只要改改配置就能用了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1023 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 18:57 · PVG 02:57 · LAX 11:57 · JFK 14:57
    ♥ Do have faith in what you're doing.