Skip to content

Commit

Permalink
Merge pull request #18 from cloudAndMonkey/master
Browse files Browse the repository at this point in the history
apijson function支持脚本引擎,比如JavaScript、lua等,代码合并缺失
  • Loading branch information
TommyLemon authored Feb 2, 2023
2 parents e72995c + fa15fa7 commit 91f0c8b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/java/apijson/framework/APIJSONApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

import apijson.Log;
import apijson.NotNull;
import apijson.orm.AbstractFunctionParser;
import apijson.orm.script.ScriptExecutor;


/**启动入口 Application
Expand Down Expand Up @@ -154,4 +156,8 @@ protected static void onServerError(String msg, boolean shutdown) throws ServerE
}
}

public static void addScriptExecutor(String language, ScriptExecutor scriptExecutor) {
scriptExecutor.init();
AbstractFunctionParser.SCRIPT_EXECUTOR_MAP.put(language, scriptExecutor);
}
}

0 comments on commit 91f0c8b

Please sign in to comment.