From cd5a449c42d53df35b3d9cbfc048c1d814127c44 Mon Sep 17 00:00:00 2001 From: Qin Dong Ming <2720806930@qq.com> Date: Thu, 5 Sep 2024 20:24:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=BC=96=E8=AF=91class?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/muyu/context/GenerateConstant.java | 30 +------------------ 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/cloud-etl-common/src/main/java/com/muyu/context/GenerateConstant.java b/cloud-etl-common/src/main/java/com/muyu/context/GenerateConstant.java index 9f1f7fa..83e0e55 100644 --- a/cloud-etl-common/src/main/java/com/muyu/context/GenerateConstant.java +++ b/cloud-etl-common/src/main/java/com/muyu/context/GenerateConstant.java @@ -58,7 +58,7 @@ public class GenerateConstant { " * @Description: " + ruleVersion.getName() + "_" + ruleVersion.getVersionCode() + "\n" + " * @Version: 1.0\n" + " */\n" + - "public class " + getClassName(ruleVersion.getVersionCode()) + " extends " + level + " {\n" + + "public class " + getClassName(ruleVersion.getVersionCode()) + " extends " + "DataEngineRowActuator" + " {\n" + " @Override\n" + " public void run () {\n" + "if(DataValue.getValue==null)\n{" + @@ -83,32 +83,4 @@ public class GenerateConstant { return type; } - - public static void localDownload() { - try { - // 创建 OSSClient 实例 - OSSClient ossClient = new OSSClient(endpoint, accessKeyId, accessKeySecret); - // 下载Object到本地文件,并保存到指定的本地路径中。如果指定的本地文件存在会覆盖,不存在则新建。 - // 如果未指定本地路径,则下载后的文件默认保存到示例程序所属项目对应本地路径中。 - ossClient.getObject(new GetObjectRequest(bucketName, fileName), new File(filePath)); - // 关闭OSSClient。 - ossClient.shutdown(); - } catch (Exception e) { - e.fillInStackTrace(); - } - } - - public static Result compile(String fileName) { - JavaCompiler compiler = ToolProvider.getSystemJavaCompiler(); - String[] strings = {"-classpath", "/home/lib", "-verbose", "-d", "/home/lib", fileName+".java"}; - int result = compiler.run(null, null, null, strings); - if (result == 0) { - System.out.println("编译成功,生成的.class文件位于源代码同目录"); - } else { - System.out.println("编译失败"); - } - String externalClassFilePath = "/home"; - return Result.success(); - } - }