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