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.
Author:
etienne-sf
  • Constructor Details

    • NonSpringWithSpringGraphQLConfMain

      public NonSpringWithSpringGraphQLConfMain()
  • Method Details

    • main

      public static void main(String[] args)
    • run

      public void run(String... args) throws Exception
      This method is started by Spring, once the Spring context has been loaded. This is run, as this class implements CommandLineRunner
      Specified by:
      run in interface org.springframework.boot.CommandLineRunner
      Throws:
      Exception
    • getQueryExecutor

      public static QueryExecutor getQueryExecutor()
      Getter for the QueryExecutor that has been loaded by Spring
      Returns:
    • getSubscriptionExecutor

      public static SubscriptionExecutor getSubscriptionExecutor()
      Getter for the SubscriptionExecutor that has been loaded by Spring
      Returns: