allow subclassing of SpringApplicationBuilder
This commit is contained in:
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…
Reference in New Issue