Customizing SpringApplication
If the SpringApplication defaults are not to your taste, you can instead create a local instance and customize it.
For example, to turn off the banner, you could write:
- 
Java 
- 
Kotlin 
import org.springframework.boot.Banner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class MyApplication {
	public static void main(String[] args) {
		SpringApplication application = new SpringApplication(MyApplication.class);
		application.setBannerMode(Banner.Mode.OFF);
		application.run(args);
	}
}import org.springframework.boot.Banner
import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.boot.runApplication
@SpringBootApplication
class MyApplication
fun main(args: Array<String>) {
	runApplication<MyApplication>(*args) {
		setBannerMode(Banner.Mode.OFF)
	}
}| The constructor arguments passed to SpringApplicationare configuration sources for Spring beans.
In most cases, these are references to@Configurationclasses, but they could also be direct references@Componentclasses. | 
It is also possible to configure the SpringApplication by using an application.properties file.
See Externalized Configuration for details.
For a complete list of the configuration options, see the SpringApplication Javadoc.