Skip to content
This repository was archived by the owner on Oct 25, 2021. It is now read-only.

Commit 73b01e9

Browse files
committed
starter is working
1 parent 1e99af1 commit 73b01e9

File tree

6 files changed

+12
-25
lines changed

6 files changed

+12
-25
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ buildscript {
1818
jcenter()
1919
}
2020
dependencies {
21-
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.+'
21+
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
2222
}
2323
}
2424

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,9 @@
1-
plugins {
2-
id 'java'
3-
}
4-
5-
group 'com.graphql-java'
6-
version '1.0-SNAPSHOT'
71

8-
sourceCompatibility = 1.8
2+
version = "1.0"
93

10-
repositories {
11-
mavenCentral()
12-
}
4+
def springBootVersion = "2.1.0.RELEASE"
135

146
dependencies {
15-
compile "org.springframework.boot:spring-boot-autoconfigure:2.1.0.RELEASE"
7+
compile "org.springframework.boot:spring-boot-autoconfigure:$springBootVersion"
168
compile project(':graphql-java-spring-web')
179
}

graphql-java-spring-boot-starter/src/main/java/graphql/GraphQLEndpointConfiguration.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,15 @@
44
import org.springframework.context.annotation.ComponentScan;
55
import org.springframework.context.annotation.Configuration;
66

7+
import javax.annotation.PostConstruct;
8+
79
@Configuration
810
@ConditionalOnWebApplication
911
@ComponentScan("graphql")
1012
public class GraphQLEndpointConfiguration {
1113

1214

15+
@PostConstruct
16+
public void init() {
17+
}
1318
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
2+
graphql.GraphQLEndpointConfiguration

graphql-java-spring-web/build.gradle

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,3 @@
1-
plugins {
2-
id 'java'
3-
}
4-
5-
group 'com.graphql-java'
6-
version '1.0-SNAPSHOT'
7-
8-
sourceCompatibility = 1.8
9-
10-
repositories {
11-
mavenCentral()
12-
}
131

142
dependencies {
153
compile "org.springframework:spring-web:5.1.2.RELEASE"

graphql-java-spring-web/src/main/java/graphql/GraphQLResource.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public class GraphQLResource {
1818
private GraphQL graphql;
1919

2020

21-
@RequestMapping(value = "${graphql.url}", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
21+
@RequestMapping(value = "/graphql", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
2222
public Map<String, Object> graphql(@RequestBody Map<String, Object> body) {
2323
String query = (String) body.get("query");
2424
if (query == null) {

0 commit comments

Comments
 (0)