allow subclassing of SpringApplicationBuilder

pull/941/merge
Graeme Rocher 11 years ago committed by Dave Syer
parent 021f8eba03
commit 514dad6d22

@ -80,7 +80,18 @@ public class SpringApplicationBuilder {
private boolean registerShutdownHookApplied;
public SpringApplicationBuilder(Object... sources) {
this.application = new SpringApplication(sources);
this.application = createSpringApplication(sources);
}
/**
* Creates a new {@link org.springframework.boot.SpringApplication} instances from the given sources. Subclasses may
* override in order to provide a custom subclass of {@link org.springframework.boot.SpringApplication}
*
* @param sources The sources
* @return The {@link org.springframework.boot.SpringApplication} instance
*/
protected SpringApplication createSpringApplication(Object... sources) {
return new SpringApplication(sources);
}
/**

Loading…
Cancel
Save