org.springframework.http.HttpStatus#FAILED_DEPENDENCY源码实例Demo

下面列出了org.springframework.http.HttpStatus#FAILED_DEPENDENCY 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: CheckPoint   文件: PoiWorkBook.java
private void checkDependency() {
    try {
       Class.forName("org.apache.poi.hssf.usermodel.HSSFWorkbook");
    } catch (ClassNotFoundException e) {
        throw new ValidationLibException("Not found apache POI library, must import poi to your maven or gradle dependency", HttpStatus.FAILED_DEPENDENCY);
    }
}
 
源代码2 项目: backstopper   文件: ClientfacingErrorITest.java
@RequestMapping("/throw4xxServerHttpStatusCodeException")
public void throw4xxServerHttpStatusCodeException() {
    HttpClientErrorException serverResponseEx = new HttpClientErrorException(HttpStatus.FAILED_DEPENDENCY, "ignoreme", responseBodyForDownstreamServiceError(), null);
    throw new ServerHttpStatusCodeException(new Exception("Intentional test exception"), "FOO", serverResponseEx, serverResponseEx.getStatusCode().value(), serverResponseEx.getResponseHeaders(), serverResponseEx.getResponseBodyAsString());
}