Browse Source

@IPU_FIXBUG_0050@weihf@调整用户未登录的错误码为HTTP的错误码。

weihf 4 years ago
parent
commit
0142ad2255

+ 2 - 1
ipu-rest-scaffold/src/main/java/com/ai/ipu/server/config/RedisSessionInterceptor.java

@ -6,6 +6,7 @@ import javax.servlet.http.HttpServletResponse;
6 6

7 7

8 8
import org.springframework.beans.factory.annotation.Autowired;
9
import org.springframework.http.HttpStatus;
9 10
import org.springframework.web.servlet.HandlerInterceptor;
10 11
import org.springframework.web.servlet.ModelAndView;
11 12

@ -36,7 +37,7 @@ public class RedisSessionInterceptor implements HandlerInterceptor {
36 37
				e.printStackTrace();
37 38
			}
38 39
		}
39
		throw new IpuException("404-用户未登录!");
40
		throw new IpuException(HttpStatus.UNAUTHORIZED+"-用户未登录!");
40 41
	}
41 42

42 43