|
@@ -42,7 +42,7 @@ public class OCRUtil {
|
|
|
// Endpoint 请参考 https://api.aliyun.com/product/ocr-api
|
|
|
// 服务地址 ocr-api.cn-hangzhou.aliyuncs.com
|
|
|
// VPC地址 ocr-api-vpc.cn-hangzhou.aliyuncs.com
|
|
|
- .setEndpointOverride("ocr-api-vpc.cn-hangzhou.aliyuncs.com")
|
|
|
+ .setEndpointOverride("ocr-api.cn-hangzhou.aliyuncs.com")
|
|
|
//.setConnectTimeout(Duration.ofSeconds(30))
|
|
|
)
|
|
|
.build();
|
|
@@ -65,7 +65,7 @@ public class OCRUtil {
|
|
|
final JSONObject data = JSONUtil.parseObj(body.getData());
|
|
|
content = StrUtil.replace(data.get("content", String.class), " ", "");
|
|
|
} catch (Exception e) {
|
|
|
- throw new RemoteServiceException("OCR服务异常");
|
|
|
+ throw new RemoteServiceException("OCR服务异常" + e.getMessage());
|
|
|
} finally {
|
|
|
client.close();
|
|
|
}
|