Class NonSpringWithSpringGraphQLConfMain
java.lang.Object
com.graphql_java_generator.non_spring_app.NonSpringWithSpringGraphQLConfMain
- All Implemented Interfaces:
org.springframework.boot.CommandLineRunner
@SpringBootApplication(scanBasePackageClasses={MinimalSpringApp.class,com.graphql_java_generator.client.GraphqlClientUtils.class,QueryExecutor.class})
public class NonSpringWithSpringGraphQLConfMain
extends Object
implements org.springframework.boot.CommandLineRunner
This class demonstrates how to use the Spring Boot configuration capabilities, with a non spring app. It can be used
to use this plugin, and its configuration capabilities (Spring Security, OAuth, https, and all what's permitted by
Spring Boot), along with an already existing non spring app.
The general idea is to have a Spring app, that loads the context and all the GraphQL stuff. Then, call the non spring app. Getters then allow to retrieve the GraphQL components.
The general idea is to have a Spring app, that loads the context and all the GraphQL stuff. Then, call the non spring app. Getters then allow to retrieve the GraphQL components.
- Author:
- etienne-sf
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic QueryExecutor
Getter for theQueryExecutor
that has been loaded by Springstatic SubscriptionExecutor
Getter for theSubscriptionExecutor
that has been loaded by Springstatic void
void
This method is started by Spring, once the Spring context has been loaded.
-
Constructor Details
-
NonSpringWithSpringGraphQLConfMain
public NonSpringWithSpringGraphQLConfMain()
-
-
Method Details
-
main
-
run
This method is started by Spring, once the Spring context has been loaded. This is run, as this class implementsCommandLineRunner
- Specified by:
run
in interfaceorg.springframework.boot.CommandLineRunner
- Throws:
Exception
-
getQueryExecutor
Getter for theQueryExecutor
that has been loaded by Spring- Returns:
-
getSubscriptionExecutor
Getter for theSubscriptionExecutor
that has been loaded by Spring- Returns:
-