应用程序列表大小为 0

ApplicationList size is 0

我正在尝试使用 stormpath 和 spring 引导获取 facebook 数据。但我得到的 ApplicationList 大小为 0。

        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>
ApplicationList applications = tenant.getApplications(
                Applications.where(Applications.name().eqIgnoreCase("My Main"))
        ); // applications size is 0 I am getting

你能证实你的 Applications.name() 是正确的吗?这很愚蠢,但我认为它来自这里:-)

你也可以看看简单的quickstart Stormpath tuto

实际上,我输入了错误的应用程序名称是我的错 "My Main"。这就是为什么我得到大小为 0 的原因。