0
大家都知道,在發佈春季引導戰爭,我們應該擴大SpringBootServletInitializer,然後覆蓋配置方法如下圖所示:當擴展SpringBootInitializer時,爲什麼我應該重寫configure方法?
@SpringBootApplication
public class DemoApplication extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
return builder.sources(DemoApplication.class);
}
}
我評論的overrided配置方法,然後應用程序運行沒有任何exception.Then,爲什麼我應該重寫configure方法,它的用法是什麼?