Commit 62692ed56110d80c38e2931e7670e89b8b48f871

Authored by jiangjiazhi
1 parent ff2ca2ed96

增加退出登录接口

Showing 1 changed file with 6 additions and 0 deletions

platform-common/src/main/java/com/lyms/platform/common/base/ExceptionHandlerController.java View file @ 62692ed
... ... @@ -70,6 +70,7 @@
70 70  
71 71 @ExceptionHandler(MethodArgumentNotValidException.class)
72 72 @ResponseStatus(HttpStatus.OK)
  73 + @ResponseBody
73 74 public Map validationError(MethodArgumentNotValidException e, HttpServletResponse httpServletResponse) {
74 75 setHttpResponseHeader(httpServletResponse);
75 76  
... ... @@ -79,6 +80,7 @@
79 80  
80 81 @ExceptionHandler(BindException.class)
81 82 @ResponseStatus(HttpStatus.OK)
  83 + @ResponseBody
82 84 public Map validationError(BindException e, HttpServletResponse httpServletResponse) {
83 85 setHttpResponseHeader(httpServletResponse);
84 86  
... ... @@ -99,6 +101,7 @@
99 101  
100 102 @ResponseStatus(HttpStatus.OK)
101 103 @ExceptionHandler(TokenException.class)
  104 + @ResponseBody
102 105 public Map buildTokenExpire(HttpServletResponse httpServletResponse) {
103 106 setHttpResponseHeader(httpServletResponse);
104 107 Map<String, Object> resultMap = new HashMap<>();
... ... @@ -115,6 +118,7 @@
115 118 */
116 119 @ResponseStatus(HttpStatus.OK)
117 120 @ExceptionHandler(org.springframework.web.bind.MissingServletRequestParameterException.class)
  121 + @ResponseBody
118 122 public Map handlMissingServletRequestParameter(HttpServletResponse httpServletResponse,
119 123 MissingServletRequestParameterException missRequestParameter,
120 124 HttpServletRequest httpServletRequest) {
... ... @@ -128,6 +132,7 @@
128 132  
129 133 @ResponseStatus(HttpStatus.OK)
130 134 @ExceptionHandler(BusinessException.class)
  135 + @ResponseBody
131 136 public Map handlBusinessException(HttpServletResponse httpServletResponse, BusinessException busExc) {
132 137 setHttpResponseHeader(httpServletResponse);
133 138 Map<String, Object> resultMap = new HashMap<>();
... ... @@ -139,6 +144,7 @@
139 144  
140 145 @ResponseStatus(HttpStatus.OK)
141 146 @ExceptionHandler(Exception.class)
  147 + @ResponseBody
142 148 public Map<String, Object> buildException(HttpServletResponse httpServletResponse, Exception e, HttpServletRequest httpServletRequest) {
143 149 setHttpResponseHeader(httpServletResponse);
144 150 Map<String, Object> resultMap = new HashMap<>();