在Grails Spring Security Core Plugin中设置会话超时 [英] setting session timeout in Grails Spring Security Core Plugin
问题描述
该插件没有会话持续时间的设置 - 它只是使用为整个应用程序配置的任何内容。你可以通过编辑web.xml(如果你还没有运行 grails install-templates
并编辑 src / templates / war / web .XML
。添加
< session-config>
< session-timeout> 30< / session-timeout>
< / session-config>
在 welcome-file-list
元素之前并将会话超时
值设置为您希望的分钟数。
Despite searching the plugin docs and general searching, I can't find an answer to this one. The closest I've gotten is the end of this page, which seems to describe setting a Tomcat timeout. There is an entire section of the plugin docs titled "Configuration Settings Now in Config.groovy", is there no way to configure timeout for the plugin without involving the container's settings?
The plugin doesn't have settings for session duration - it just uses whatever is configured for the whole app. You can do this by editing web.xml (run grails install-templates
if you haven't yet) and edit src/templates/war/web.xml
. Add
<session-config>
<session-timeout>30</session-timeout>
</session-config>
before the welcome-file-list
element and set the session-timeout
value to whatever number of minutes you want it to be.
这篇关于在Grails Spring Security Core Plugin中设置会话超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!