From 90ec21220d6e331e2fa791fa14fec24c0ad67a5b Mon Sep 17 00:00:00 2001
From: liriming <1343021927@qq.com>
Date: 星期四, 27 三月 2025 16:04:01 +0800
Subject: [PATCH] 动态数据源

---
 iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/common/utils/JavaScriptHandler.java |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/common/utils/JavaScriptHandler.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/common/utils/JavaScriptHandler.java
index c47391b..6c47762 100644
--- a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/common/utils/JavaScriptHandler.java
+++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/common/utils/JavaScriptHandler.java
@@ -1,6 +1,9 @@
 package com.iailab.module.data.common.utils;
 
 import javax.annotation.Resource;
+
+import cn.hutool.script.JavaScriptEngine;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Component;
 
 import javax.script.ScriptEngine;
@@ -10,6 +13,7 @@
  * @author PanZhibao
  * @date 2021年06月04日 16:01
  */
+@Slf4j
 @Component
 public class JavaScriptHandler {
 
@@ -20,6 +24,7 @@
         try {
             return scriptEngine.eval(script).toString();
         } catch (ScriptException e) {
+            log.error("计算异常,计算公式:" + script);
             e.printStackTrace();
             return null;
         }

--
Gitblit v1.9.3