我正在尝试使用本指南从架构生成 pojo 文件https://netflix.github.io/dgs/generating-code-from-schema/
构建.gradle.kts
dependencies {
implementation("org.springframework.boot:spring-boot-starter-web")
implementation(project(":graphql-dgs-spring-boot-starter"))
implementation(project(":graphql-dgs-subscriptions-websockets-autoconfigure"))
implementation("io.projectreactor:reactor-core:3.4.0")
api("com.graphql-java:graphql-java:${Versions.GRAPHQL_JAVA}") //v 16.2
}
// Using plugins DSL
plugins {
id("com.netflix.dgs.codegen") version "4.4.1"
}
tasks {
generateJava {
// schemaPaths = ["${projectDir}/src/main/resources/schema"] // List of directories containing schema files
packageName ="com.example.packagename" // The package name to use to generate sources
generateClient = true // Enable generating the type safe query API
}
}
得到错误
Caused by: java.lang.UnsupportedOperationException: java.io.InvalidClassException: org.antlr.v4.runtime.atn.ATN; Could not deserialize ATN with UUID 59627784-3be5-417a-b9eb-8131a7286089 (expected aadb8d7e-aeef-4415-ad2b-8204d6cf042e or a legacy UUID).
at org.antlr.v4.runtime.atn.ATNDeserializer.deserialize(ATNDeserializer.java:153)
at graphql.parser.antlr.GraphqlLexer.<clinit>(GraphqlLexer.java:337)
... 231 more
Caused by: java.io.InvalidClassException: org.antlr.v4.runtime.atn.ATN; Could not deserialize ATN with UUID 59627784-3be5-417a-b9eb-8131a7286089 (expected aadb8d7e-aeef-4415-ad2b-8204d6cf042e or a legacy UUID).
... 233 more
我尝试了旧版本的插件,但没有帮助