作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有这段代码,但是我在maven-repository中找不到
要导入的正确库。有人知道是哪个吗?
import com.google.api.client.extensions.jetty.auth.oauth2.LocalServerReceiver;
/** Authorizes the installed application to access user's protected data. */
private static Credential authorize() throws IOException {
dataStoreFactory = new FileDataStoreFactory(DATA_STORE_DIR);
// set up authorization code flow
GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(
TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES).setDataStoreFactory(
dataStoreFactory).build();
// authorize
return new AuthorizationCodeInstalledApp(flow, new LocalServerReceiver()).authorize("user");
}
我找不到 com.google.api.client.extensions.jetty
https://mvnrepository.com/search?q=com.google.api.client.extensions.jetty
最佳答案
给你:https://mvnrepository.com/artifact/com.google.oauth-client/google-oauth-client-jetty/1.22.0
<dependency>
<groupId>com.google.oauth-client</groupId>
<artifactId>google-oauth-client-jetty</artifactId>
<version>1.22.0</version>
</dependency>
关于java - 如何导入 LocalServerReceiver()?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40406183/
我有这段代码,但是我在maven-repository中找不到 要导入的正确库。有人知道是哪个吗? import com.google.api.client.extensions.jetty.auth
我正在尝试创建一个将发送电子邮件的 java 文件。我创建了一个 Google 网络应用程序项目,对其进行了配置(希望我做得正确),然后按照 Java Quickstart guide 进行操作. 虽
我是一名优秀的程序员,十分优秀!