0
我的问题已经在这里找到答案: apiKeyRequired in google cloud endpoint not getting resolved在谷歌“apiKeyRequired”云终端没有得到解决(2日)
但它没有为我工作。
我仍然有这个问题,即IDE无法解析apiKeyRequired属性。我正在使用端点框架2. +。
@Api(
name = "api",
version = "v1",
apiKeyRequired = AnnotationBoolean.TRUE,
namespace = @ApiNamespace(
ownerDomain = "backendDomain.myapplication.test.example.com",
ownerName = "backendName.myapplication.test.example.com",
packagePath = ""
)
)
public class MyEndpoint {
...
的build.gradle
...
apply plugin: 'java'
apply plugin: 'war'
apply plugin: 'appengine'
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
dependencies {
appengineSdk 'com.google.appengine:appengine-java-sdk:1.9.54'
compile 'javax.servlet:servlet-api:2.5'
compile 'com.google.appengine:appengine-endpoints:1.9.54'
compile 'com.google.appengine:appengine-endpoints-deps:1.9.54'
compile 'com.google.endpoints:endpoints-framework:2.0.7'
}
...