Example usage for org.springframework.boot SpringApplication setWebApplicationType

List of usage examples for org.springframework.boot SpringApplication setWebApplicationType

Introduction

In this page you can find the example usage for org.springframework.boot SpringApplication setWebApplicationType.

Prototype

public void setWebApplicationType(WebApplicationType webApplicationType) 

Source Link

Document

Sets the type of web application to be run.

Usage

From source file:com.erudika.scoold.ScooldServer.java

public static void main(String[] args) {
    ((ch.qos.logback.classic.Logger) logger).setLevel(ch.qos.logback.classic.Level.TRACE);
    SpringApplication app = new SpringApplication(ScooldServer.class);
    initConfig();//from   www .j a v  a  2  s. co m
    app.setAdditionalProfiles(Config.ENVIRONMENT);
    app.setWebApplicationType(WebApplicationType.SERVLET);
    app.run(args);
}

From source file:org.springframework.cloud.function.context.AbstractSpringFunctionAdapterInitializer.java

private SpringApplication springApplication() {
    Class<?> sourceClass = this.configurationClass;
    SpringApplication application = new org.springframework.cloud.function.context.FunctionalSpringApplication(
            sourceClass);//from w  w  w .j  a  va2s  .  c o m
    application.setWebApplicationType(WebApplicationType.NONE);
    return application;
}