Spring-boot Spring-Security session timeout

后端 未结 5 628
长发绾君心
长发绾君心 2020-12-09 05:52

UPDATED QUESTION:

I have a spring-boot 1.1.3.RELEASE project that is using EmbeddedTomcat and Spring-Security. I posted this a while back

5条回答
  •  臣服心动
    2020-12-09 06:18

    Just to update this, because I went looking for an answer and couldn't find it easily:

    You can set the server.session.cookie.max-age=

    in your application.properties to force the log out after a certain time.

    This one actually uses seconds, not minutes, as the integer value. So set it to something reasonable like 120 for 2 minutes.

提交回复
热议问题