From 274592ed3389ff47219a9978a0877408facf33eb Mon Sep 17 00:00:00 2001 From: lijiarao Date: Fri, 29 Mar 2024 10:55:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9OMML2MML.XSL=E7=9A=84?= =?UTF-8?q?=E5=BC=95=E5=85=A5=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/example/mathtoimg/utils/OmmlUtils.java | 17 +---------------- src/main/resources/application.properties | 2 +- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/src/main/java/com/example/mathtoimg/utils/OmmlUtils.java b/src/main/java/com/example/mathtoimg/utils/OmmlUtils.java index b59b21d..f1c69b1 100644 --- a/src/main/java/com/example/mathtoimg/utils/OmmlUtils.java +++ b/src/main/java/com/example/mathtoimg/utils/OmmlUtils.java @@ -46,22 +46,7 @@ public class OmmlUtils { * @throws TransformerException */ private static String getMathMLFromNode(Node node,String omml2mmlFilePath) throws IOException, TransformerException { - ClassLoader classLoader = OmmlUtils.class.getClassLoader(); - URL url = classLoader.getResource("xsl/OMML2MML.XSL"); - File xslFile = null; - if (url != null) { - try { - xslFile = new File(url.toURI()); - } catch (Exception e) { - e.printStackTrace(); - } - } - -// final File xslFile = new File("/omml2mml.xsl"); -// final File xslFile = new File("D:\\MyCode\\omml-test\\omml2mml.xsl"); -// boolean exists = xslFile.exists(); - - //final File xslFile = new File(omml2mmlFilePath); + File xslFile = new File(omml2mmlFilePath); StreamSource streamSource = new StreamSource(xslFile); String s = W3cNodeUtil.node2XmlStr(node); diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index b42af5e..0108ab4 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -3,7 +3,7 @@ server.port = 9998 # \u751F\u6210\u7684\u7279\u6B8A\u516C\u5F0F\u6587\u4EF6\u5B58\u50A8\u8DEF\u5F84 file.mathToImgFilePath = D://opt//mathToImg # \u5904\u7406\u7279\u6B8A\u516C\u5F0F\u6240\u9700\u6587\u4EF6\u8DEF\u5F84 -xsl.omml2mmlFilePath = D://workspace//laws_biyadi//mathToImg//xsl//OMML2MML.XSL +xsl.omml2mmlFilePath = D://hzwl//laws-sinotruk1//mathtoimg//xsl//OMML2MML.XSL # minio\u6587\u4EF6\u4E0A\u4F20 jero.minio.minio_url = 10.10.10.45:9000 jero.minio.minio_name = admin