diff --git a/pom.xml b/pom.xml index 96a8a47acf428e721d652157bf3c488523219bd4..d827a44ae050ec8edeff5c797c11cc01470c34e9 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ ink.rayin rayin-parent pom - 1.1.1 + 1.1.2-B3 rayin-parent pdf template generate tools http://rayin.ink @@ -174,29 +174,29 @@ ink.rayin rayin-tools - 1.1.1 + 1.1.2-B3 ink.rayin rayin-htmladapter-openhtmltopdf - 1.1.1 + 1.1.2-B3 ink.rayin rayin-htmladapter-spring-boot-starter - 1.1.1 + 1.1.2-B3 ink.rayin rayin-htmladapter-base - 1.1.1 + 1.1.2-B3 ink.rayin rayin-datarule - 1.1.1 + 1.1.2-B3 org.apache.commons @@ -352,4 +352,4 @@ - \ No newline at end of file + diff --git a/rayin-datarule/pom.xml b/rayin-datarule/pom.xml index a9f8b810b1da378f09ff0e6c5b7841dd0241e555..c1ad5ac581e00ccb6d607523d0400b1a8969b190 100644 --- a/rayin-datarule/pom.xml +++ b/rayin-datarule/pom.xml @@ -5,12 +5,12 @@ rayin-parent ink.rayin - 1.1.1 + 1.1.2-B3 4.0.0 rayin-datarule - 1.1.1 + 1.1.2-B3 8 8 @@ -108,4 +108,4 @@ - \ No newline at end of file + diff --git a/rayin-datarule/src/main/java/ink/rayin/datarule/DataRule.java b/rayin-datarule/src/main/java/ink/rayin/datarule/DataRule.java index c0a7a0ce3686b8cd1796ec571c5c21b828267f90..21514d6c3b7557a2b61379e9f528ad5232966a19 100644 --- a/rayin-datarule/src/main/java/ink/rayin/datarule/DataRule.java +++ b/rayin-datarule/src/main/java/ink/rayin/datarule/DataRule.java @@ -11,6 +11,7 @@ import groovy.transform.ThreadInterrupt; import ink.rayin.htmladapter.base.utils.RayinException; import ink.rayin.tools.utils.DigestUtil; import ink.rayin.tools.utils.ResourceUtil; +import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.codehaus.groovy.control.CompilerConfiguration; @@ -142,8 +143,9 @@ public class DataRule { * @param scriptString 脚本字符串 * @return 数据对象 */ + @SneakyThrows public Object executeGroovyScript(JSONObject data, JSONObject otherData, String dataName, - String otherDataName, String scriptString) { + String otherDataName, String scriptString){ Binding binding = new Binding(); binding.setProperty(dataName, data); binding.setProperty(otherDataName, otherData); @@ -161,20 +163,20 @@ public class DataRule { groovyScript.setBinding(binding); Future future = threadPool.submit((Callable) groovyScript::run); - try{ + //try{ return future.get(30, TimeUnit.SECONDS); - }catch (TimeoutException exception) { - future.cancel(true); - log.error("TimeoutException,try cancel future task, is cancelled", exception); - //do something else - }catch (InterruptedException exception){ - future.cancel(true); - log.error("InterruptedException,try cancel future task, is cancelled" , exception); - }catch (ExecutionException exception){ - future.cancel(true); - log.error("ExecutionException,try cancel future task, is cancelled" , exception); - } - return null; +// }catch (TimeoutException exception) { +// future.cancel(true); +// log.error("TimeoutException,try cancel future task, is cancelled", exception); +// //do something else +// }catch (InterruptedException exception){ +// future.cancel(true); +// log.error("InterruptedException,try cancel future task, is cancelled" , exception); +// }catch (ExecutionException exception){ +// future.cancel(true); +// log.error("ExecutionException,try cancel future task, is cancelled" , exception); +// } +// return null; } /** diff --git a/rayin-htmladapter-base/pom.xml b/rayin-htmladapter-base/pom.xml index 867e3b27690354d08dba1cb19a78b0f3158b73b3..e6930e4f87464a818e20239720b7c5998c3e6836 100644 --- a/rayin-htmladapter-base/pom.xml +++ b/rayin-htmladapter-base/pom.xml @@ -5,12 +5,12 @@ rayin-parent ink.rayin - 1.1.1 + 1.1.2-B3 4.0.0 rayin-htmladapter-base - 1.1.1 + 1.1.2-B3 ink.rayin @@ -217,4 +217,4 @@ - \ No newline at end of file + diff --git a/rayin-htmladapter-openhtmltopdf/pom.xml b/rayin-htmladapter-openhtmltopdf/pom.xml index 37d7887c3d89b221679356f2c59a74e9055c7d04..e153607bcc0d9ea1829438dbb64b9348ad808e68 100644 --- a/rayin-htmladapter-openhtmltopdf/pom.xml +++ b/rayin-htmladapter-openhtmltopdf/pom.xml @@ -5,18 +5,18 @@ rayin-parent ink.rayin - 1.1.1 + 1.1.2-B3 4.0.0 rayin-htmladapter-openhtmltopdf - 1.1.1 + 1.1.2-B3 jar 1.0.10 - 2.0.27 + 2.0.29 @@ -46,6 +46,10 @@ org.apache.pdfbox pdfbox + + org.apache.pdfbox + fontbox + @@ -270,4 +274,4 @@ - \ No newline at end of file + diff --git a/rayin-htmladapter-spring-boot-starter/pom.xml b/rayin-htmladapter-spring-boot-starter/pom.xml index 80c137119e6206c0ee0d0496df48b094aba41db5..ca5e407912ff55bccac2e95f718dab3dd542a3e2 100644 --- a/rayin-htmladapter-spring-boot-starter/pom.xml +++ b/rayin-htmladapter-spring-boot-starter/pom.xml @@ -5,12 +5,12 @@ rayin-parent ink.rayin - 1.1.1 + 1.1.2-B3 4.0.0 rayin-htmladapter-spring-boot-starter - 1.1.1 + 1.1.2-B3 jar @@ -94,4 +94,4 @@ - \ No newline at end of file + diff --git a/rayin-springboot-sample/pom.xml b/rayin-springboot-sample/pom.xml index 76b80cb2477de93127ea6b21c5251b6f6da8de4f..71854e27c93e40a1457705905b03e858dfa44b4b 100644 --- a/rayin-springboot-sample/pom.xml +++ b/rayin-springboot-sample/pom.xml @@ -7,17 +7,17 @@ org.springframework.boot spring-boot-starter-parent - 2.7.4 + 3.1.3 ink.rayin - 1.1.0 + 1.1.2-B3 rayin-springboot-sample - 8 - 8 + 17 + 17 @@ -35,7 +35,7 @@ ink.rayin rayin-htmladapter-spring-boot-starter - 1.1.1 + 1.1.2-B3 @@ -106,4 +106,4 @@ - \ No newline at end of file + diff --git a/rayin-springboot-sample/src/main/java/ink/rayin/springboot/controller/PDFCreatorController.java b/rayin-springboot-sample/src/main/java/ink/rayin/springboot/controller/PDFCreatorController.java index f22f4610a78b2abf81e58a9cbd464d49ab27066d..87c72803f25e168ac39dfbd658cc2578f9b101cb 100644 --- a/rayin-springboot-sample/src/main/java/ink/rayin/springboot/controller/PDFCreatorController.java +++ b/rayin-springboot-sample/src/main/java/ink/rayin/springboot/controller/PDFCreatorController.java @@ -6,13 +6,13 @@ import ink.rayin.htmladapter.base.PdfGenerator; import ink.rayin.htmladapter.base.Signature; import ink.rayin.tools.utils.Charsets; import ink.rayin.tools.utils.ResourceUtil; +import jakarta.servlet.http.HttpServletResponse; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; -import javax.servlet.http.HttpServletResponse; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.OutputStream; @@ -92,4 +92,4 @@ public class PDFCreatorController { } -} \ No newline at end of file +} diff --git a/rayin-test/pom.xml b/rayin-test/pom.xml index 9b53e65e4fc0b41973ae4b048fa4f2df8ef3fb5a..0ca4f173f79e20b8576d79d74f8b1f9715f02a0e 100644 --- a/rayin-test/pom.xml +++ b/rayin-test/pom.xml @@ -5,20 +5,20 @@ rayin-parent ink.rayin - 1.1.1 + 1.1.2-B3 4.0.0 ink.rayin - 1.1.1 + 1.1.2-B3 rayin-test 1.0.0 - 1.8 - 1.8 + 17 + 17 UTF-8 UTF-8 - 1.8 + 17 @@ -146,4 +146,4 @@ - \ No newline at end of file + diff --git a/rayin-test/src/test/resources/examples/example5/element1.html b/rayin-test/src/test/resources/examples/example5/element1.html index 4d8ecd311919d4fc43f87185ffbe3e60246b5e58..e9b5b1152d3a4d8c8b56bfef3394b45c43979efc 100644 --- a/rayin-test/src/test/resources/examples/example5/element1.html +++ b/rayin-test/src/test/resources/examples/example5/element1.html @@ -4,10 +4,10 @@