xueyiming 2 месяцев назад
Родитель
Сommit
aaf9c7621f

+ 16 - 0
pom.xml

@@ -139,12 +139,28 @@
     </dependencies>
 
     <build>
+        <!-- 固定包名 避免随着版本变动 -->
+        <finalName>features-tools</finalName>
+        <resources>
+            <resource>
+                <directory>src/main/resources</directory>
+                <includes>
+                    <include>**/*.yml</include>
+                    <include>**/*.yaml</include>
+                    <include>**/*.xml</include>
+                    <include>**/*.properties</include>
+                </includes>
+                <filtering>false</filtering>
+            </resource>
+        </resources>
         <plugins>
             <plugin>
                 <groupId>org.springframework.boot</groupId>
                 <artifactId>spring-boot-maven-plugin</artifactId>
             </plugin>
         </plugins>
+
     </build>
 
+
 </project>

+ 0 - 48
src/test/java/com/tzld/piaoquan/featurestools/FeaturesToolsApplicationTests.java

@@ -1,59 +1,11 @@
 package com.tzld.piaoquan.featurestools;
 
-import com.tzld.piaoquan.featurestools.job.CreativeVideoUnderstandJob;
-import com.tzld.piaoquan.featurestools.job.SummarizeUnderstandingJob;
-import com.tzld.piaoquan.featurestools.service.TextEmbeddingService;
-import org.junit.jupiter.api.Test;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.core.io.ClassPathResource;
-
-import java.io.BufferedReader;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.util.HashSet;
-import java.util.Set;
 
 
 @SpringBootTest
 class FeaturesToolsApplicationTests {
 
-    @Autowired
-    private CreativeVideoUnderstandJob creativeVideoUnderstandJob;
-
-    @Autowired
-    private SummarizeUnderstandingJob summarizeUnderstandingJob;
-
-    @Autowired
-    private TextEmbeddingService textEmbeddingService;
-
-    @Test
-    void contextLoads() throws InterruptedException {
-        creativeVideoUnderstandJob.videoUnderstander("");
-    }
-
-    @Test
-    void contextLoads1() throws InterruptedException {
-//        System.out.println(textEmbeddingService.getEmbedding("福利来了,绿树成荫,健康自然,亲切自信"));
-        summarizeUnderstandingJob.summarizeUnderstanding("");
-    }
-
-    private static final Set<String> stopwords = new HashSet<String>();
-
-    @Test
-    void cc() throws IOException {
-        // 创建 ClassPathResource 对象,指定资源文件路径
-        ClassPathResource resource = new ClassPathResource("stopwords_cn.txt");
-        // 获取文件输入流
-        BufferedReader reader = new BufferedReader(new InputStreamReader(resource.getInputStream()));
-        String line;
-        while ((line = reader.readLine()) != null) {
-            stopwords.add(line.trim());
-        }
-
-        System.out.println("stopwords = " + stopwords);
 
-    }
 
 }