diff --git a/pom.xml b/pom.xml
index 00cc722..b47b23d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,6 +13,12 @@
jython-standalone
2.7.0
+
+ org.projectlombok
+ lombok
+ true
+ 1.18.20
+
@@ -26,4 +32,20 @@
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+
+ org.projectlombok
+ lombok
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/java/JavaRunPythonFunc.java b/src/main/java/JavaRunPythonFunc.java
index c0a8906..c5c7f3d 100644
--- a/src/main/java/JavaRunPythonFunc.java
+++ b/src/main/java/JavaRunPythonFunc.java
@@ -1,3 +1,4 @@
+import org.python.core.PyDictionary;
import org.python.core.PyFunction;
import org.python.core.PyInteger;
import org.python.core.PyObject;
diff --git a/src/main/java/JavaRunPythonFuncMapParms.java b/src/main/java/JavaRunPythonFuncMapParms.java
new file mode 100644
index 0000000..cfa53b3
--- /dev/null
+++ b/src/main/java/JavaRunPythonFuncMapParms.java
@@ -0,0 +1,37 @@
+import org.python.core.*;
+import org.python.util.PythonInterpreter;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author yanpeng
+ * @version 1.0
+ * @desc TODO
+ * @company 北京中经网软件有限公司
+ * @date 2021/7/16 17:43
+ */
+public class JavaRunPythonFuncMapParms {
+ public static void main(String[] args) {
+ PythonInterpreter interpreter = new PythonInterpreter();
+ interpreter.execfile("F:\\workspace\\python\\demo\\javaPythonFuncFileParams.py");
+ Map map = new HashMap();
+ map.put(new PyString("nelson"), PyJavaType.wrapJavaObject("yasaka"));
+ // 第一个参数为期望获得的函数(变量)的名字,第二个参数为期望返回的对象类型
+ PyFunction pyFunction = interpreter.get("add", PyFunction.class);
+ //调用函数,如果函数需要参数,在Java中必须先将参数转化为对应的“Python类型”
+ PyObject pyobj = pyFunction.__call__(new PyDictionary(map));
+ System.out.println("the anwser is: " + pyobj);
+
+ Vo vo = Vo.builder().age(1).id("nelson").name("nelson name").build();
+ Vo vo1 = Vo.builder().age(2).id("yasaka").name("yasaka name").build();
+ PyList pyList = new PyList();
+ pyList.add(vo);
+ pyList.add(vo1);
+
+ pyobj = pyFunction.__call__(pyList);
+ List voList = (List) pyobj.__tojava__(List.class);
+ System.out.println("the list anwser is: " + voList);
+ }
+}
diff --git a/src/main/java/Vo.java b/src/main/java/Vo.java
new file mode 100644
index 0000000..bc8693a
--- /dev/null
+++ b/src/main/java/Vo.java
@@ -0,0 +1,19 @@
+import lombok.Builder;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @author yanpeng
+ * @version 1.0
+ * @desc TODO
+ * @company 北京中经网软件有限公司
+ * @date 2021/7/20 11:40
+ */
+@Data
+@Builder
+public class Vo implements Serializable {
+ private String id;
+ private String name;
+ private Integer age;
+}
diff --git a/src/main/java/javaPythonFuncFileParams.py b/src/main/java/javaPythonFuncFileParams.py
new file mode 100644
index 0000000..f0bdeb8
--- /dev/null
+++ b/src/main/java/javaPythonFuncFileParams.py
@@ -0,0 +1,11 @@
+def add(a):
+ print(a)
+ print(type(a))
+ if type(a) == list:
+ print(a[0])
+ print(type(a[0]))
+ print(a[0].name)
+ print(type(a[0].name))
+ print(a[0].age)
+ print(type(a[0].age))
+ return a
\ No newline at end of file