提交 959035c6 作者: chenshiqiang

add filter typeId

上级 a4afd31e
...@@ -183,6 +183,19 @@ ...@@ -183,6 +183,19 @@
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId> <artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency> </dependency>
<!--word-html处理工具-->
<dependency>
<groupId>com.aspose</groupId>
<artifactId>aspose-words</artifactId>
<version>15.12.0</version>
<scope>system</scope>
<systemPath>${basedir}/lib/aspose-words-15.12.0-jdk16.jar</systemPath>
</dependency>
<dependency>
<groupId>org.fusesource.hawtbuf</groupId>
<artifactId>hawtbuf</artifactId>
<version>1.11</version>
</dependency>
</dependencies> </dependencies>
......
...@@ -37,6 +37,8 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -37,6 +37,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException; import java.io.IOException;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -90,10 +92,11 @@ class KnowledgeServiceImpl implements IKnowledgeService { ...@@ -90,10 +92,11 @@ class KnowledgeServiceImpl implements IKnowledgeService {
List<String> contentStringList = new ArrayList<>(); List<String> contentStringList = new ArrayList<>();
String html = null; String html = null;
try { try {
html = DocUtil.docParseHtml(filesStorage + knowledge.getFiles().get(0).getFilePath()); File file = new File(filesStorage + knowledge.getFiles().get(0).getFilePath());
html =DocUtil.convertDocStream2Html(new FileInputStream(file));
String htmlWithTable = html.replace("<p>", ""); String htmlWithTable = html.replace("<p>", "");
contentStringList = Arrays.asList(htmlWithTable.split("</p>")); contentStringList = Arrays.asList(htmlWithTable.split("</p>"));
} catch (IOException e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
List<String> messageContentList = contentStringList.stream() List<String> messageContentList = contentStringList.stream()
......
<License>
<Data>
<Products>
<Product>Aspose.Total for Java</Product>
<Product>Aspose.Words for Java</Product>
</Products>
<EditionType>Enterprise</EditionType>
<SubscriptionExpiry>20991231</SubscriptionExpiry>
<LicenseExpiry>20991231</LicenseExpiry>
<SerialNumber>8bfe198c-7f0c-4ef8-8ff0-acc3237bf0d7</SerialNumber>
</Data>
<Signature>sNLLKGMUdF0r8O1kKilWAGdgfs2BvJb/2Xp8p5iuDVfZXmhppo+d0Ran1P9TKdjV4ABwAgKXxJ3jcQTqE/2IRfqwnPf8itN8aFZlV3TJPYeD3yWE7IT55Gz6EijUpC7aKeoohTb4w2fpox58wWoF3SNp6sK6jDfiAUGEHYJ9pjU=</Signature>
</License>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论