|
|
|
@ -1,8 +1,10 @@
|
|
|
|
|
package com.supervision.demo;
|
|
|
|
|
|
|
|
|
|
import com.deepoove.poi.XWPFTemplate;
|
|
|
|
|
import com.supervision.minio.service.MinioService;
|
|
|
|
|
import com.supervision.police.dto.caseScore.CaseScoreDetailDTO;
|
|
|
|
|
import com.supervision.police.service.ModelService;
|
|
|
|
|
import com.supervision.utils.PDFReadUtil;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.junit.jupiter.api.Test;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
@ -16,7 +18,11 @@ import java.util.HashMap;
|
|
|
|
|
public class WordRenderTest {
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private ModelService modelService;
|
|
|
|
|
private MinioService minioService;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private ModelService modelService;
|
|
|
|
|
|
|
|
|
|
public static void main(String[] args) throws FileNotFoundException {
|
|
|
|
|
HashMap<String, Object> data = new HashMap<>();
|
|
|
|
|
data.put("name", "张三");
|
|
|
|
@ -54,4 +60,10 @@ public class WordRenderTest {
|
|
|
|
|
throw new RuntimeException(e);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
public void pdf2text() {// 创建文件对象
|
|
|
|
|
String content = PDFReadUtil.pdf2text(minioService.getObjectInputStream("1848552470327439362"));
|
|
|
|
|
log.info("content:{}", content);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|