This repository was archived by the owner on Oct 25, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +12
-5
lines changed
graphql-java-spring-boot-starter/src/main
graphql-java-spring-web/src/main/java/graphql/spring/controller Expand file tree Collapse file tree 3 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 1- package graphql ;
1+ package graphql . spring ;
22
3+ import graphql .spring .controller .GraphQLController ;
4+ import org .springframework .beans .factory .annotation .Autowired ;
35import org .springframework .boot .autoconfigure .condition .ConditionalOnWebApplication ;
6+ import org .springframework .context .ApplicationContext ;
47import org .springframework .context .annotation .ComponentScan ;
58import org .springframework .context .annotation .Configuration ;
69
710import javax .annotation .PostConstruct ;
811
912@ Configuration
1013@ ConditionalOnWebApplication
11- @ ComponentScan ("graphql" )
14+ @ ComponentScan (basePackageClasses = GraphQLController . class )
1215public class GraphQLEndpointConfiguration {
1316
17+ @ Autowired
18+ ApplicationContext applicationContext ;
1419
1520 @ PostConstruct
1621 public void init () {
Original file line number Diff line number Diff line change 11org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
2- graphql.GraphQLEndpointConfiguration
2+ graphql.spring. GraphQLEndpointConfiguration
Original file line number Diff line number Diff line change 1- package graphql ;
1+ package graphql . spring . controller ;
22
33
4+ import graphql .ExecutionInput ;
5+ import graphql .GraphQL ;
46import org .springframework .beans .factory .annotation .Autowired ;
57import org .springframework .http .MediaType ;
68import org .springframework .web .bind .annotation .RequestBody ;
1214import java .util .Map ;
1315
1416@ RestController
15- public class GraphQLResource {
17+ public class GraphQLController {
1618
1719 @ Autowired
1820 private GraphQL graphql ;
You can’t perform that action at this time.
0 commit comments