This repository was archived by the owner on Dec 19, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
graphql-spring-boot-autoconfigure
src/main/java/graphql/kickstart/autoconfigure/web/servlet Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -21,11 +21,11 @@ dependencies {
21
21
api " com.graphql-java-kickstart:graphql-java-tools:$LIB_GRAPHQL_JAVA_TOOLS_VER "
22
22
api(project(" :graphql-kickstart-spring-support" ))
23
23
api(project(' :graphql-kickstart-spring-webflux' ))
24
- implementation " org.springframework.boot:spring-boot-autoconfigure"
25
24
api " com.graphql-java:graphql-java-extended-scalars:$LIB_EXTENDED_SCALARS_VER "
26
25
api " com.graphql-java-kickstart:graphql-java-kickstart:$LIB_GRAPHQL_SERVLET_VER "
27
26
api " com.graphql-java-kickstart:graphql-java-servlet:$LIB_GRAPHQL_SERVLET_VER "
28
27
api " com.graphql-java:graphql-java:$LIB_GRAPHQL_JAVA_VER "
28
+ implementation " org.springframework.boot:spring-boot-autoconfigure"
29
29
// annotations
30
30
api " io.github.graphql-java:graphql-java-annotations:$LIB_GRAPHQL_ANNOTATIONS_VER "
31
31
implementation " org.reflections:reflections:$LIB_REFLECTIONS_VER "
Original file line number Diff line number Diff line change 25
25
import org .springframework .context .annotation .Bean ;
26
26
import org .springframework .context .annotation .Conditional ;
27
27
import org .springframework .context .annotation .Configuration ;
28
- import org .springframework .web .servlet .DispatcherServlet ;
29
28
import org .springframework .web .socket .server .standard .ServerEndpointExporter ;
30
29
import org .springframework .web .socket .server .standard .ServerEndpointRegistration ;
31
30
32
31
@ Configuration
33
32
@ RequiredArgsConstructor
34
33
@ ConditionalOnWebApplication (type = Type .SERVLET )
35
- @ ConditionalOnClass (DispatcherServlet .class )
34
+ @ ConditionalOnClass ({ ServerContainer .class } )
36
35
@ Conditional (OnSchemaOrSchemaProviderBean .class )
37
36
@ SuppressWarnings ("SpringJavaInjectionPointsAutowiringInspection" )
38
37
@ ConditionalOnProperty (
@@ -75,14 +74,14 @@ private Optional<SubscriptionConnectionListener> keepAliveListener() {
75
74
}
76
75
77
76
@ Bean
78
- @ ConditionalOnClass (ServerContainer .class )
77
+ @ ConditionalOnClass (ServerEndpointRegistration .class )
79
78
public ServerEndpointRegistration serverEndpointRegistration (GraphQLWebsocketServlet servlet ) {
80
79
return new GraphQLWsServerEndpointRegistration (websocketProperties .getPath (), servlet );
81
80
}
82
81
83
82
@ Bean
84
83
@ ConditionalOnMissingBean
85
- @ ConditionalOnClass (ServerContainer .class )
84
+ @ ConditionalOnClass (ServerEndpointExporter .class )
86
85
public ServerEndpointExporter serverEndpointExporter () {
87
86
return new ServerEndpointExporter ();
88
87
}
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ dependencies {
25
25
compileOnly(" com.graphql-java:graphql-java:$LIB_GRAPHQL_JAVA_VER " )
26
26
compileOnly(" com.graphql-java-kickstart:graphql-java-servlet:$LIB_GRAPHQL_SERVLET_VER " )
27
27
testImplementation(" org.springframework.boot:spring-boot-starter-web" )
28
+ testImplementation " org.springframework.boot:spring-boot-starter-websocket"
28
29
testImplementation project(" :graphql-spring-boot-starter" )
29
30
testImplementation " io.reactivex.rxjava2:rxjava"
30
31
}
You can’t perform that action at this time.
0 commit comments