package demo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

@SpringBootApplication
public class DemoApplication extends WebMvcConfigurerAdapter {

	public static void main(String[] args) {
		SpringApplication.run(DemoApplication.class, args);
	}

	@Override
	public void addViewControllers(ViewControllerRegistry registry) {
		registry.addViewController("/").setViewName("home");
	}

}

@@ -120,32 +120,233 @@
 ootApplication;%0A
+import org.springframework.boot.builder.SpringApplicationBuilder;%0Aimport org.springframework.boot.web.support.SpringBootServletInitializer;%0Aimport org.springframework.context.annotation.Configuration;%0A
 import org.sprin
@@ -557,33 +557,184 @@
 nds 
-WebMvcConfigurerAdapter %7B
+SpringBootServletInitializer %7B%0A%0A%09@Override%0A%09protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) %7B%0A%09%09return builder.sources(DemoApplication.class);%0A%09%7D
 %0A%0A%09p
@@ -831,16 +831,95 @@
 s);%0A%09%7D%0A%0A
+%09@Configuration%0A%09static class WebMvcConfig extends WebMvcConfigurerAdapter %7B%0A%0A%09
 %09@Overri
@@ -921,16 +921,17 @@
 verride%0A
+%09
 %09public 
@@ -991,16 +991,17 @@
 ry) %7B%0A%09%09
+%09
 registry
@@ -1045,14 +1045,19 @@
 home%22);%0A
+%09%09%7D%0A%0A
 %09%7D%0A%0A%7D%0A

Fix missing servlet initializer