Class SpringApplicationBuilder

java.lang.Object
org.springframework.boot.builder.SpringApplicationBuilder

public class SpringApplicationBuilder extends Object
Builder for SpringApplication and ApplicationContext instances with convenient fluent API and context hierarchy support. Simple example of a context hierarchy:
 new SpringApplicationBuilder(ParentConfig.class).child(ChildConfig.class).run(args);
 
Another common use case is setting active profiles and default properties to set up the environment for an application:
 new SpringApplicationBuilder(Application.class).profiles("server")
                .properties("transport=local").run(args);
 

If your needs are simpler, consider using the static convenience methods in SpringApplication instead.

Since:
1.0.0
Author:
Dave Syer, Andy Wilkinson
See Also: