Java Google docs Api驱动器无方法导出
我需要以pdf格式获取我的文档文件。我读了这篇文章并尝试使用它,但我的驱动器对象中没有方法导出。你能帮我吗 这是我的Pom文件:Java Google docs Api驱动器无方法导出,java,spring-mvc,google-api,google-drive-api,google-docs,Java,Spring Mvc,Google Api,Google Drive Api,Google Docs,我需要以pdf格式获取我的文档文件。我读了这篇文章并尝试使用它,但我的驱动器对象中没有方法导出。你能帮我吗 这是我的Pom文件: <google-api-version>1.20.0</google-api-version> <dependency> <groupId>com.google.api-client</groupId> <artifactId>google-api
<google-api-version>1.20.0</google-api-version>
<dependency>
<groupId>com.google.api-client</groupId>
<artifactId>google-api-client</artifactId>
<version>${google-api-version}</version>
</dependency>
<dependency>
<groupId>com.google.oauth-client</groupId>
<artifactId>google-oauth-client</artifactId>
<version>${google-api-version}</version>
</dependency>
<dependency>
<groupId>com.google.apis</groupId>
<artifactId>google-api-services-drive</artifactId>
<version>v2-rev170-${google-api-version}</version>
</dependency>
<dependency>
<groupId>com.google.oauth-client</groupId>
<artifactId>google-oauth-client-jetty</artifactId>
<version>1.21.0</version>
</dependency>
1.20.0
com.google.api-client
谷歌api客户端
${google api版本}
com.google.oauth-client
谷歌oauth客户端
${google api版本}
com.google.api
谷歌api服务驱动
v2-rev170-${google api版本}
com.google.oauth-client
谷歌oauth客户端jetty
1.21.0
将POM中的版本更改为
<dependency>
<groupId>com.google.apis</groupId>
<artifactId>google-api-services-drive</artifactId>
<version>v3-rev6-1.20.0</version>
</dependency>
com.google.api
谷歌api服务驱动
v3-rev6-1.20.0
您指的是v3文档。您使用的是v2版本。这两者之间有许多不同之处。检查是否存在任何版本问题。我不确定……谢谢!当我尝试drive.files().export(fileId,PDFType.executeAndDownloadTo(bos)时;我有一个错误:api.client.googleapis.json.GoogleJsonResponseException:403禁止权限不足。//如何解决这个问题?救命啊!在ver2中,我可以像这样在我的网页上共享文档:drive.files().get(fileID.execute().getAlternateLink());我如何在ver3中做到这一点?事实上,我也面临着同样的问题,我无法得到一个链接回来。唯一的办法就是为我回到v2。