从Java执行python代码(python解释器)

时间:2019-04-28 09:51:52

标签: java spring-boot

我有一个spring execute函数,它接受以下json:

@RequestMapping(value="/execute", method=RequestMethod.GET)
public ResultModel excute(@RequestBody(required=false) EndPointModel end){}

{
“testPython”: “%python print 1+1”
}

然后此函数必须执行此查询并返回预期结果。

{
“result”: “2”
}

我为此做了很多搜索,但是我没有找到想要的东西。

0 个答案:

没有答案