diff --git a/jodconverter-web/src/main/java/cn/keking/FilePreviewApplication.java b/jodconverter-web/src/main/java/cn/keking/FilePreviewApplication.java index 9870fa45..b7996733 100644 --- a/jodconverter-web/src/main/java/cn/keking/FilePreviewApplication.java +++ b/jodconverter-web/src/main/java/cn/keking/FilePreviewApplication.java @@ -9,7 +9,14 @@ import org.springframework.scheduling.annotation.EnableScheduling; @EnableScheduling @ComponentScan(value = "cn.keking.*") public class FilePreviewApplication { + public static void main(String[] args) { + FilePreviewApplication.staticInitSystemProperty(); SpringApplication.run(FilePreviewApplication.class, args); } + + private static void staticInitSystemProperty(){ + //pdfbox兼容低版本jdk + System.setProperty("sun.java2d.cmm", "sun.java2d.cmm.kcms.KcmsServiceProvider"); + } }