Commit 993879d8 authored by alex yao's avatar alex yao

feat:修改MinerU 地址

parent 0457ced1
......@@ -29,7 +29,7 @@ public class MinerUAPI {
public final OkHttpClient HTTP_CLIENT = new OkHttpClient().newBuilder().readTimeout(300, TimeUnit.SECONDS).build();
private String MinerU_URL = "http://i-1.gpushare.com:53412/file_parse";
private String MinerU_URL = "http://i-2.gpushare.com:53865/file_parse";
public Object parsePDF(MinerUResponse minerUResponse) {
MultipartBody.Builder builder = new MultipartBody.Builder().setType(MultipartBody.FORM);
......
package cn.com.poc.mineru;
import cn.com.poc.thirdparty.resource.minerU.MinerUResponse;
import cn.com.poc.thirdparty.resource.minerU.api.MinerUAPI;
import cn.com.yict.framemax.core.spring.SingleContextInitializer;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import javax.annotation.Resource;
import java.io.File;
/**
* @author alex.yao
* @date 2025/10/30 23:46
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(initializers = SingleContextInitializer.class)
@WebAppConfiguration
public class MinerUTest {
@Resource
private MinerUAPI minerUAPI;
@Test
public void test_minerU() {
File file = new File("C:\\Users\\Ayyy\\Desktop\\土地租赁合同2.pdf");
MinerUResponse minerUResponse = new MinerUResponse();
minerUResponse.setFiles(file);
System.out.println(minerUAPI.parsePDF(minerUResponse).toString());
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment