为什么createdatastore()抛出com.google.appengine.api.datastore.entitynotfoundexception?

pieyvz9o  于 2021-06-26  发布在  Java
关注(0)|答案(0)|浏览(222)

当我尝试将datastorefactory设置为googleauthorizationcodeflow entitynotfoundexception时,会引发异常。我的代码

@Bean
    public GoogleAuthorizationCodeFlow googleAuthorizationCodeFlow() throws GeneralSecurityException, IOException {
        InputStream in = GoogleService.class.getResourceAsStream(CREDENTIALS_FILE_PATH);
        GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));
        AppEngineDataStoreFactory factory = AppEngineDataStoreFactory.getDefaultInstance();
        return new GoogleAuthorizationCodeFlow.Builder(
                netHttpTransport(), JSON_FACTORY, clientSecrets, SCOPES)
                .setDataStoreFactory(factory)
                .setApprovalPrompt("force")
                .setAccessType("offline")
                .build();
    }

.setdatastorefactory(工厂)引发此异常。

protected <V extends Serializable> DataStore<V> createDataStore(String id) throws IOException {
        return new AppEngineDataStoreFactory.AppEngineDataStore(this, id);
    }

使用此方法后,debbug将停止工作。我不明白为什么会这样。
有人能帮我吗?

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题