Merge branch 'master' of https://git.iwulin.tech/quyixiao/eb-service-api
This commit is contained in:
commit
7c7d5252c9
@ -14,6 +14,7 @@ import com.heyu.api.data.utils.StringUtils;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
@ -40,7 +41,7 @@ public class GeneralBasicOcrController extends BaseController {
|
|||||||
// http://localhost:8888/general/text/orc/recognize?imageBase64=3232
|
// http://localhost:8888/general/text/orc/recognize?imageBase64=3232
|
||||||
@EbAuthentication(tencent = ApiConstants.TENCENT_AUTH)
|
@EbAuthentication(tencent = ApiConstants.TENCENT_AUTH)
|
||||||
@RequestMapping("/recognize")
|
@RequestMapping("/recognize")
|
||||||
public R recognize(GeneralBasicOcrRequest generalBasicOcrRequest) throws Exception {
|
public R recognize(@RequestBody GeneralBasicOcrRequest generalBasicOcrRequest) throws Exception {
|
||||||
|
|
||||||
|
|
||||||
//String base64 = Base64Utils.encodeImageToBase64("/Users/quyixiao/Desktop/ocr/testxxx.jpg");
|
//String base64 = Base64Utils.encodeImageToBase64("/Users/quyixiao/Desktop/ocr/testxxx.jpg");
|
||||||
|
|||||||
@ -16,6 +16,7 @@ import com.heyu.api.data.utils.StringUtils;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
@ -36,7 +37,7 @@ public class HighPrecisionOcrController {
|
|||||||
// https://heyuoss.oss-cn-shanghai.aliyuncs.com/prd/testxxx.jpg
|
// https://heyuoss.oss-cn-shanghai.aliyuncs.com/prd/testxxx.jpg
|
||||||
@EbAuthentication(tencent = ApiConstants.TENCENT_AUTH)
|
@EbAuthentication(tencent = ApiConstants.TENCENT_AUTH)
|
||||||
@RequestMapping("/recognize")
|
@RequestMapping("/recognize")
|
||||||
public R recognize(HighPrecisionOcrRequest generalBasicOcrRequest) throws Exception {
|
public R recognize(@RequestBody HighPrecisionOcrRequest generalBasicOcrRequest) throws Exception {
|
||||||
|
|
||||||
// 读取文件内容到Stream流中,按行读取
|
// 读取文件内容到Stream流中,按行读取
|
||||||
//Stream<String> lines = Files.lines(Paths.get("/Users/quyixiao/gitb/eb-service-api/api-web/api-interface/src/main/resources/pdfbase64.txt"));
|
//Stream<String> lines = Files.lines(Paths.get("/Users/quyixiao/gitb/eb-service-api/api-web/api-interface/src/main/resources/pdfbase64.txt"));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user