update jpype1

This commit is contained in:
yanchunhuo 2021-05-17 20:18:04 +08:00
parent faf0e5f33f
commit e2fba5270b
3 changed files with 6 additions and 5 deletions

View File

@ -25,7 +25,8 @@ class DubboClient:
:param requestInterfaceClassName 请求接口类名,需完整包路径
:param requestMethod 请求方法
:param params 所有参数放在一个数组内格式:
无参数填写[]
无参数填写[]
参数值为null填写null字符串即可当前支持String自定义对象类型
一个基本数据类型参数(byteshortintlongdoublefloatboolean)[{"type":"int","data":"value"}]
一个基本数据类型数组参数[{"type":"int[]","data":[{"type":"int","data":"value"},{"type":"int","data":"value"}]}]
一个java.lang数据类型参数[{"type":"java.lang.String","data":"1"}]
@ -42,7 +43,7 @@ class DubboClient:
params=ujson.dumps(params)
result=self._dubboClient.request(requestInterfaceClassName,requestMethod,params)
if result:
return ujson.loads(result)
return ujson.loads(str(result))
def object2Json(self,className):
"""
@ -50,4 +51,4 @@ class DubboClient:
:param className: 需要转换的类名需填写完整路径
:return:
"""
return self._DubboClient.object2Json(className)
return str(self._DubboClient.object2Json(className))

View File

@ -37,5 +37,5 @@ class StartJpypeJVM(object):
def __init__(self):
if self.__inited is None:
jpype.startJVM(jpype.get_default_jvm_path(), "-ea", "-Djava.class.path=" + JavaTool.getAllJar())
jpype.startJVM(jpype.getDefaultJVMPath(), "-ea", "-Djava.class.path=" + JavaTool.getAllJar())
self.__inited = True

View File

@ -7,7 +7,7 @@ requests==2.24.0
Appium-Python-Client==0.48
selenium==3.141.0
cx_Oracle==6.3.1
JPype1==0.6.3
JPype1==1.2.1
paramiko==2.4.0
Pillow==5.3.0
scikit-image==0.16.2