添加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
*/
@Component
public class GlobalException implements EventListener<Exception> {
public class GlobalException implements EventListener<SaTokenException> {
@Override
public void onEvent(Exception e) {
if (e instanceof SaTokenException) {
public void onEvent(SaTokenException e) {
Context c = Context.current();
if (c != null) {
// 不同异常返回不同状态码
AjaxJson aj = null;
@ -42,4 +42,3 @@ public class GlobalException implements EventListener<Exception> {
}
}
}
}