mirror of
https://gitee.com/pan648540858/wvp-GB28181-pro.git
synced 2026-06-29 21:47:50 +08:00
Compare commits
3 Commits
cfea75bc41
...
a39be07c04
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a39be07c04 | ||
|
|
c73d6a1b27 | ||
|
|
da98101aac |
@ -11,6 +11,7 @@ import org.springframework.web.HttpRequestMethodNotSupportedException;
|
|||||||
import org.springframework.web.bind.annotation.ExceptionHandler;
|
import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||||
import org.springframework.web.bind.annotation.ResponseStatus;
|
import org.springframework.web.bind.annotation.ResponseStatus;
|
||||||
import org.springframework.web.bind.annotation.RestControllerAdvice;
|
import org.springframework.web.bind.annotation.RestControllerAdvice;
|
||||||
|
import org.springframework.web.servlet.resource.NoResourceFoundException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 全局异常处理
|
* 全局异常处理
|
||||||
@ -31,6 +32,17 @@ public class GlobalExceptionHandler {
|
|||||||
return WVPResult.fail(ErrorCode.ERROR500.getCode(), e.getMessage());
|
return WVPResult.fail(ErrorCode.ERROR500.getCode(), e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 默认异常处理
|
||||||
|
* @param e 异常
|
||||||
|
* @return 统一返回结果
|
||||||
|
*/
|
||||||
|
@ExceptionHandler(NoResourceFoundException.class)
|
||||||
|
@ResponseStatus(HttpStatus.BAD_REQUEST)
|
||||||
|
public WVPResult<String> exceptionHandler(NoResourceFoundException e) {
|
||||||
|
return WVPResult.fail(ErrorCode.ERROR404);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 默认异常处理
|
* 默认异常处理
|
||||||
* @param e 异常
|
* @param e 异常
|
||||||
|
|||||||
@ -861,7 +861,7 @@
|
|||||||
320623,如东县,3206
|
320623,如东县,3206
|
||||||
320681,启东市,3206
|
320681,启东市,3206
|
||||||
320682,如皋市,3206
|
320682,如皋市,3206
|
||||||
320684,海门市,3206
|
320684,海门区,3206
|
||||||
320685,海安市,3206
|
320685,海安市,3206
|
||||||
3207,连云港市,32
|
3207,连云港市,32
|
||||||
320703,连云区,3207
|
320703,连云区,3207
|
||||||
@ -918,8 +918,6 @@
|
|||||||
33,浙江省,
|
33,浙江省,
|
||||||
3301,杭州市,33
|
3301,杭州市,33
|
||||||
330102,上城区,3301
|
330102,上城区,3301
|
||||||
330103,下城区,3301
|
|
||||||
330104,江干区,3301
|
|
||||||
330105,拱墅区,3301
|
330105,拱墅区,3301
|
||||||
330106,西湖区,3301
|
330106,西湖区,3301
|
||||||
330108,滨江区,3301
|
330108,滨江区,3301
|
||||||
@ -927,6 +925,8 @@
|
|||||||
330110,余杭区,3301
|
330110,余杭区,3301
|
||||||
330111,富阳区,3301
|
330111,富阳区,3301
|
||||||
330112,临安区,3301
|
330112,临安区,3301
|
||||||
|
330113,临平区,3301
|
||||||
|
330114,钱塘区,3301
|
||||||
330122,桐庐县,3301
|
330122,桐庐县,3301
|
||||||
330127,淳安县,3301
|
330127,淳安县,3301
|
||||||
330182,建德市,3301
|
330182,建德市,3301
|
||||||
|
|||||||
|
Loading…
Reference in New Issue
Block a user