我有一个类,它有一个资源属性,类型为resource in spring (org.springframework.core.io.Resource),它接受一个文件对象作为输入。setResource(Resource resource) this.resource = resource;但是,我正在通过另一个自定义API读取远程文档,该API将文档内容作为字符串返回String xml = document.getContent();
我想在我的setResource方法
我尝试将一个类传递给Python中的一个函数,然后在函数中实例化它并返回它。到目前为止,这是有效的,但只要我尝试添加Python类型,我就会得到以下错误:
Expected no arguments to "object" constructor Pylance (reportGeneralTypeIssues