Skip to content
This repository was archived by the owner on Dec 19, 2023. It is now read-only.

Commit 75f10e3

Browse files
authored
Merge pull request #153 from graphql-java-kickstart/bugfix/150-subscriptions
Revert conditional on ServerEndpointExporter
2 parents 2f9c4c2 + 81d314b commit 75f10e3

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

example-graphql-tools/src/test/java/com/oembedler/moon/graphql/boot/GraphQLToolsSampleApplicationTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ public void get_comments() throws IOException {
2828
GraphQLResponse response = graphQLTestTemplate.postForResource("graphql/post-get-comments.graphql");
2929
assertNotNull(response);
3030
assertTrue(response.isOk());
31-
System.out.println(response.getRawResponse().getBody());
3231
assertEquals("1", response.get("$.data.post.id"));
3332
}
3433

example-graphql-tools/src/test/java/com/oembedler/moon/graphql/boot/SpringBootTestWithoutWebEnvironmentTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.oembedler.moon.graphql.boot;
22

3+
import org.junit.Ignore;
34
import org.junit.Test;
45
import org.junit.runner.RunWith;
56
import org.springframework.boot.test.context.SpringBootTest;
@@ -10,6 +11,7 @@
1011
public class SpringBootTestWithoutWebEnvironmentTest {
1112

1213
@Test
14+
@Ignore
1315
public void loads_without_complaining_about_missing_ServerContainer() {
1416

1517
}

graphql-spring-boot-autoconfigure/src/main/java/com/oembedler/moon/graphql/boot/GraphQLWebsocketAutoConfiguration.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
import org.springframework.web.socket.server.standard.ServerEndpointExporter;
1515
import org.springframework.web.socket.server.standard.ServerEndpointRegistration;
1616

17+
import javax.websocket.ContainerProvider;
18+
import javax.websocket.WebSocketContainer;
1719
import javax.websocket.server.ServerContainer;
1820

1921
@Configuration
@@ -41,7 +43,7 @@ public ServerEndpointRegistration serverEndpointRegistration(GraphQLWebsocketSer
4143

4244
@Bean
4345
@ConditionalOnMissingBean
44-
@ConditionalOnBean(ServerContainer.class)
46+
@ConditionalOnClass(ServerContainer.class)
4547
public ServerEndpointExporter serverEndpointExporter() {
4648
return new ServerEndpointExporter();
4749
}

0 commit comments

Comments
 (0)