Browse Source

lowflow配置文件、报错代码注释

fuyuchuan 1 week ago
parent
commit
18730b7b2e

+ 1 - 1
flow-common/flow-common-oauth2-starter/src/main/java/com/flow/common/oauth2/configure/ResourceServerConfigure.java

@@ -36,7 +36,7 @@ public class ResourceServerConfigure extends ResourceServerConfigurerAdapter {
                 .antMatchers("/static/file/**").permitAll()
                 .antMatchers("/auth/login", "/auth/code", "/auth/logout", "/user/list", "/model/download").permitAll()
                 // websocket路径放行
-                .antMatchers("/socket/**").permitAll()
+                .antMatchers("/socket/**", "/api/socket/**").permitAll()
                 // 其他所有请求都需要认证
                 .anyRequest().authenticated();
     }

+ 5 - 5
flow-file/flow-file-biz/pom.xml

@@ -28,13 +28,13 @@
         <!--
         mvn install:install-file -Dfile=${project.basedir}/lib/aspose-cells-8.5.2.jar -DgroupId=com.aspose -DartifactId=aspose-cells -Dversion=8.5.2 -Dpackaging=jar
         -->
-        <dependency>
-            <groupId>com.aspose</groupId>
-            <artifactId>aspose-cells</artifactId>
-            <version>8.5.2</version>
+<!--        <dependency>-->
+<!--            <groupId>com.aspose</groupId>-->
+<!--            <artifactId>aspose-cells</artifactId>-->
+<!--            <version>8.5.2</version>-->
             <!--<scope>system</scope>
             <systemPath>${project.basedir}/lib/aspose-cells-8.5.2.jar</systemPath>-->
-        </dependency>
+<!--        </dependency>-->
     </dependencies>
 
 </project>

+ 43 - 43
flow-file/flow-file-biz/src/main/java/com/flow/converter/ExcelToPdfConverter.java

@@ -1,43 +1,43 @@
-package com.flow.converter;
-
-import com.aspose.cells.License;
-import com.aspose.cells.PdfSaveOptions;
-import com.aspose.cells.Workbook;
-import com.flow.common.core.exception.BaseException;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-
-public class ExcelToPdfConverter implements FileConverter {
-
-    /**
-     * excel转pdf
-     *
-     * @param inputStream
-     * @param outputStream
-     * @throws Exception
-     */
-    public void convert(InputStream inputStream, OutputStream outputStream) throws Exception {
-        this.validateLicense();
-        Workbook wb = new Workbook(inputStream);
-        PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
-        pdfSaveOptions.setOnePagePerSheet(true);
-        wb.save(outputStream, pdfSaveOptions);
-    }
-
-    /**
-     * 验证许可证,若不验证则转化出的pdf文档会有水印产生
-     */
-    private void validateLicense() {
-        String licenseFilePath = "excel-license.xml";
-        try {
-            InputStream is = ExcelToPdfConverter.class.getClassLoader().getResourceAsStream(licenseFilePath);
-            License license = new License();
-            license.setLicense(is);
-        } catch (Exception e) {
-            e.printStackTrace();
-            throw new BaseException("许可证验证失败");
-        }
-    }
-
-}
+// package com.flow.converter;
+//
+// import com.aspose.cells.License;
+// import com.aspose.cells.PdfSaveOptions;
+// import com.aspose.cells.Workbook;
+// import com.flow.common.core.exception.BaseException;
+//
+// import java.io.InputStream;
+// import java.io.OutputStream;
+//
+// public class ExcelToPdfConverter implements FileConverter {
+//
+//     /**
+//      * excel转pdf
+//      *
+//      * @param inputStream
+//      * @param outputStream
+//      * @throws Exception
+//      */
+//     public void convert(InputStream inputStream, OutputStream outputStream) throws Exception {
+//         this.validateLicense();
+//         Workbook wb = new Workbook(inputStream);
+//         PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
+//         pdfSaveOptions.setOnePagePerSheet(true);
+//         wb.save(outputStream, pdfSaveOptions);
+//     }
+//
+//     /**
+//      * 验证许可证,若不验证则转化出的pdf文档会有水印产生
+//      */
+//     private void validateLicense() {
+//         String licenseFilePath = "excel-license.xml";
+//         try {
+//             InputStream is = ExcelToPdfConverter.class.getClassLoader().getResourceAsStream(licenseFilePath);
+//             License license = new License();
+//             license.setLicense(is);
+//         } catch (Exception e) {
+//             e.printStackTrace();
+//             throw new BaseException("许可证验证失败");
+//         }
+//     }
+//
+// }