提交 fe0498ff 编写于 作者: R renhelan 提交者: Gitee

增加销毁方法

上级 f7b4faf7
......@@ -53,7 +53,14 @@ public class OnlineMemberEhcacheStorage implements OnlineMemberStorage {
e.printStackTrace();
}
}
//销毁
public void destroy(){
try{
cacheManager.getCacheManager().destroyCache(EHC_STORE);
}catch (Exception e){
e.printStackTrace();
}
}
@Override
public void store(MemberSessionBean memberSessionBean, HttpServletRequest request, HttpServletResponse response) {
String passStub = rndStub();
......
......@@ -252,7 +252,7 @@ public class TridentFrontConfig implements WebMvcConfigurer{
return ehcacheMemberStorage;
}
@Bean(value = "ehcacheMemberStorage", initMethod = "init")
@Bean(value = "ehcacheMemberStorage", initMethod = "init", destroyMethod = "destroy")
@Conditional(EhcacheMemberStorageCondition.class)
public OnlineMemberEhcacheStorage getMemberEhacheStorage(){
//ehcache
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册