mirror of
https://gitee.com/dromara/sa-token.git
synced 2025-05-04 04:37:56 +08:00
添加solon适配及demo
This commit is contained in:
parent
f8f698fc3d
commit
b997a2d870
@ -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> {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user