浏览 2013 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
|
|
---|---|
作者 | 正文 |
发表时间:2016-06-04
最后修改:2016-06-04
1.bboss session自定义session id生成接口 package org.frameworkset.security.session; public interface SessionIDGenerator { String generateID(); } 2.实现(以默认实现为示例) 实现(以默认实现为示例) org.frameworkset.security.session.impl.UUIDSessionIDGenerator package org.frameworkset.security.session.impl; import java.util.UUID; import org.frameworkset.security.session.SessionIDGenerator; public class UUIDSessionIDGenerator implements SessionIDGenerator { @Override public String generateID() { String sessionid= UUID.randomUUID().toString(); return sessionid; } } 3.在sessionconf.xml中配置SessionIDGenerator <property name="sessionManager" class="org.frameworkset.security.session.impl.SessionManager" init-method="init" destroy-method="destroy"> <property name="sessionIDGenerator" class="org.frameworkset.security.session.impl.UUIDSessionIDGenerator"/> <property name="sessionTimeout" value="3600000"/> <property name="sessionstore" refid="attr:sessionstore"/> <property name="cookiename" value="JSESSIONID"/> <property name="httpOnly" value="true"/> <property name="secure" value="false"/> <property name="lazystore" value="true"/> <property name="monitorAttributes" ><![CDATA[ [ {"name":"userAccount","cname":"账号","type":"String","like":true,"enableEmptyValue":false}, {"name":"worknumber","cname":"工号","type":"String","like":false,"enableEmptyValue":true} ] ]]></property> </property> <property name="sessionStaticManager" f:monitorScope="all" class="org.frameworkset.security.session.statics.MongoSessionStaticManagerImpl" /> <property name="sessionstore" class="org.frameworkset.security.session.impl.MongDBSessionStore"/> </properties> 声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |