|
@@ -47,7 +47,8 @@ public class AuthenticationInterceptor implements HandlerInterceptor {
|
|
|
// 有 @LoginRequired 注解,需要认证
|
|
|
if (methodAnnotation != null) {
|
|
|
// 执行认证 从 http 请求头中取出 token
|
|
|
- String token = request.getHeader("token");
|
|
|
+ String token = request.getHeader("token")==null? request.getParameter("token"):request.getHeader("token");
|
|
|
+ ;
|
|
|
if (token == null) {
|
|
|
throw new RuntimeException("无token,请重新登录");
|
|
|
}
|