Commit 514dad6d authored by Graeme Rocher's avatar Graeme Rocher Committed by Dave Syer

allow subclassing of SpringApplicationBuilder

parent 021f8eba
......@@ -80,10 +80,21 @@ 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);
}
/**
* Accessor for the current application context.
* @return the current application context (or null if not yet running)
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment