Resty怎么获取Session?
jiangjunfeng98 opened this issue · 2 comments
jiangjunfeng98 commented
Dreampie commented
resty提供了分布式的session,Subject对象来操作,如果要获取原生的request对象,使用 unwrap
方法
public <T> T unwrap(Class<T> clazz) {
if (clazz == HttpServletRequest.class || clazz == ServletRequest.class) {
return (T) request;
}
throw new IllegalArgumentException("underlying implementation is HttpServletRequest, not " + clazz.getName());
}
jiangjunfeng98 commented
谢谢,解决了