提交 b3be444d 编写于 作者: 街头小贩's avatar 街头小贩 提交者: Gitee

!6 增加销毁方法

Merge pull request !6 from renhelan/N/A
......@@ -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.
先完成此消息的编辑!
想要评论请 注册