All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.oembedler.moon.graphiql.boot.GraphiQLAutoConfiguration Maven / Gradle / Ivy

There is a newer version: 11.1.0
Show newest version
package com.oembedler.moon.graphiql.boot;

import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.DispatcherServlet;

/**
 * @author Andrew Potter
 */
@Configuration
@ConditionalOnWebApplication
@ConditionalOnClass(DispatcherServlet.class)
public class GraphiQLAutoConfiguration {
    @Bean
    @ConditionalOnProperty(value = "graphiql.enabled", havingValue = "true", matchIfMissing = true)
    GraphiQLController graphiQLController() {
        return new GraphiQLController();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy