添加solon适配及demo

This commit is contained in:
noear 2021-05-30 22:52:42 +08:00
parent f8f698fc3d
commit b997a2d870

View File

@ -13,12 +13,12 @@ import org.noear.solon.core.handle.Context;
* @author noear * @author noear
*/ */
@Component @Component
public class GlobalException implements EventListener<Exception> { public class GlobalException implements EventListener<SaTokenException> {
@Override @Override
public void onEvent(Exception e) { public void onEvent(SaTokenException e) {
if (e instanceof SaTokenException) {
Context c = Context.current(); Context c = Context.current();
if (c != null) { if (c != null) {
// 不同异常返回不同状态码 // 不同异常返回不同状态码
AjaxJson aj = null; AjaxJson aj = null;
@ -42,4 +42,3 @@ public class GlobalException implements EventListener<Exception> {
} }
} }
} }
}