Java 应用程序列表大小为0
我正在尝试使用和spring boot获取facebook数据。但我得到的应用程序列表大小为0Java 应用程序列表大小为0,java,spring,spring-boot,stormpath,Java,Spring,Spring Boot,Stormpath,我正在尝试使用和spring boot获取facebook数据。但我得到的应用程序列表大小为0 ApiKey apiKey = ApiKeys.builder().setFileLocation(path).build(); Client client = Clients.builder().setApiKey(apiKey).build(); Tenant tenant = client.getCurrentTenant(); A
ApiKey apiKey = ApiKeys.builder().setFileLocation(path).build();
Client client = Clients.builder().setApiKey(apiKey).build();
Tenant tenant = client.getCurrentTenant();
ApplicationList applications = tenant.getApplications(
Applications.where(Applications.name().eqIgnoreCase("My Main"))
); // applications size is 0 I am getting
Application application = applications.iterator().next();
你知道为什么吗?怎么申请
编辑:这是我的pom.xml
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.2.3.RELEASE</version>
</parent>
<properties>
<java.version>1.8</java.version>
</properties>
<dependencies>
<!-- Spring Boot -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>com.stormpath.sdk</groupId>
<artifactId>stormpath-sdk-api</artifactId>
<version>1.0.RC4.4</version>
</dependency>
<dependency>
<groupId>com.stormpath.sdk</groupId>
<artifactId>stormpath-sdk-httpclient</artifactId>
<version>1.0.RC4.4</version>
<scope>runtime</scope>
</dependency>
</dependencies>
org.springframework.boot
spring启动程序父级
1.2.3.1发布
1.8
org.springframework.boot
弹簧靴起动器
org.springframework.boot
SpringBootStarterWeb
com.stormpath.sdk
stormpath sdk api
1.0.RC4.4
com.stormpath.sdk
stormpath sdk httpclient
1.0.RC4.4
运行时
您能否验证您的应用程序.name()
是否正确?这是愚蠢的,但我认为它来自这里:-)
你也可以看一下简单的。事实上,这是我的错,我把应用程序名“my Main”放错了。这就是为什么我的大小是0。嗨@Soham,我是Stormpath的软件工程师,我很乐意帮助你解决这个问题,首先,我的名字是“my Main”对于您来说,应用程序是您通过Rest API或管理控制台创建的应用程序,要求确保该应用程序存在,并且我们可以从中获取该应用程序。您使用的SDK版本是什么?1.0.RC4.5是最新版本,应该可以正确报告大小。@jbarrueta感谢您的精确定位。我给出了错误的应用程序名称,这就是为什么它的大小为0。现在它可以工作了。感谢您的帮助。@Soham很乐意提供帮助,如果需要,请随时联系我们。@Soham如Les所述,我们建议您尝试最新版本的SDK(即1.0.RC4.5)中有一个bug和一个新功能。谢谢你的回答。@jbarrueta的评论已经解决了我的问题。@Soham你真的能纠正一个答案并接受它吗?这向社区表明它确实解决了,比添加(解决)更好在标题中。@Timo我已经回答了我自己的问题,你问了什么。谢谢:)那么你能接受我的回答作为解决你问题的答案吗?:-)@苏哈姆:你能把它也标为答案吗?时间限制现在应该已经过去了。
ApplicationList applications = tenant.getApplications(
Applications.where(Applications.name().eqIgnoreCase("My Main"))
); // applications size is 0 I am getting