Merge branch 'master' of https://github.com/metersphere/metersphere into master

This commit is contained in:
BugKing 2021-03-24 10:32:24 +08:00
commit fb941b867e
1 changed files with 2 additions and 1 deletions

View File

@ -22,7 +22,8 @@ public class ScriptEngineUtils {
}
}
public static String calculate(String input) {
// graal.js 禁止多线程同时访问加上 synchronized
public synchronized static String calculate(String input) {
try {
return engine.eval("calculate('" + input + "')").toString();
} catch (ScriptException e) {