Closed mehhras closed 2 years ago
Are you still using the experimental starter? This starter is now defunct and you should use the official Spring Boot starter from now on: https://docs.spring.io/spring-boot/docs/2.7.0-SNAPSHOT/reference/html/web.html#web.graphql
Thank you for your response. I changed it to what this link says.
But my project cannot find RuntimeWiringConfigurer. Is this file in another library?
And when I commented the line, my builder says:
Could not find org.springframework.boot:spring-boot-starter-graphql:.
Should I add another configuration?
Do you have a sample application we can take a look at? It's probably a build configuration issue.
Sure. It's my build.gradle
plugins {
id 'org.springframework.boot' version '2.6.0'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id "com.google.protobuf" version "0.8.15"
id 'java'
id 'idea'
}
apply from: 'grpc.gradle'
group = 'XX'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '17'
repositories {
mavenCentral()
maven { url 'https://repo.spring.io/milestone' } // Spring milestones
maven { url 'https://repo.spring.io/snapshot' } // Spring snapshots
}
task copyDependencies(type: Copy) {
from configurations.compileClasspath
into 'build/libs/dependencies'
}
ext {
set('springCloudVersion', "2020.0.4")
cxfOutputDir = file("$buildDir/generated/source")
}
idea.module {
excludeDirs -= file("$buildDir")
sourceDirs += cxfOutputDir
}
dependencies {
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: '2.6.0'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-data-jpa', version: '2.6.0'
implementation group: 'org.springframework.data', name: 'spring-data-commons', version: '2.6.0'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-validation', version: '2.6.0'
implementation group: 'org.springframework.boot', name: 'spring-boot-devtools', version: '2.6.0'
implementation group: 'org.springframework', name: 'spring-tx', version: '5.3.12'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-actuator', version: '2.6.0'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-webflux', version: '2.6.0'
implementation group: 'org.springframework.session', name: 'spring-session-core', version: '2.6.0'
implementation group: 'org.springframework.security', name: 'spring-security-core', version: '5.5.3'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-security', version: '2.6.0'
implementation group: 'org.flywaydb', name: 'flyway-core', version: '8.0.3'
compileOnly 'org.projectlombok:lombok:1.18.22'
annotationProcessor 'org.projectlombok:lombok:1.18.22'
implementation group: 'com.aventrix.jnanoid', name: 'jnanoid', version: '2.0.0'
implementation group: 'io.jsonwebtoken', name: 'jjwt', version: '0.9.1'
implementation group: 'javax.xml.bind', name: 'jaxb-api', version: '2.3.0'
implementation 'com.google.code.gson:gson:2.8.9'
implementation group: 'org.modelmapper', name: 'modelmapper', version: '2.4.3'
implementation group: 'io.springfox', name: 'springfox-swagger2', version: '3.0.0'
implementation group: 'org.mapstruct', name: 'mapstruct', version: '1.4.2.Final'
implementation 'org.apache.commons:commons-lang3:3.12.0'
implementation group: 'mysql', name: 'mysql-connector-java', version: '8.0.23'
implementation 'io.grpc:grpc-netty-shaded:1.42.0'
implementation 'io.grpc:grpc-protobuf:1.42.0'
implementation 'io.grpc:grpc-stub:1.42.0'
implementation group: 'io.github.lognet', name: 'grpc-spring-boot-starter', version: '4.4.5'
implementation group: 'io.perfmark', name: 'perfmark-api', version: '0.24.0'
implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.16.0'
implementation group: 'org.apache.logging.log4j', name: 'log4j-to-slf4j', version: '2.16.0'
implementation 'org.springframework.boot:spring-boot-starter-graphql'
testImplementation 'org.springframework.graphql:spring-graphql-test:1.0.0-SNAPSHOT'
implementation group: 'com.graphql-java', name: 'graphql-java-extended-scalars', version: '17.0'
testImplementation group: 'org.springframework.boot', name: 'spring-boot-starter-test', version: '2.4.4'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.6.0'
implementation 'org.springframework.boot:spring-boot-starter-actuator:2.5.6'
implementation 'io.micrometer:micrometer-registry-prometheus:1.8.1'
implementation 'org.latencyutils:LatencyUtils:2.0.3'
testImplementation group: 'com.h2database', name: 'h2', version: '2.0.206'
}
dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
}
}
test {
useJUnitPlatform()
}
You'll need Spring Boot 2.7.0-SNAPSHOT for that. This is why the starter cannot be found in your project.
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.
Hi All,
I recently faced a problem with GraphiQlHandler, but It used to be OK until yesterday. The problem is that when I want to run my project I see this exception:
Thank you in advance.