diff --git a/spring-rest-simple/src/main/java/org/baeldung/config/Application.java b/spring-rest-simple/src/main/java/org/baeldung/config/Application.java index 077213b04d..3a98da82c9 100644 --- a/spring-rest-simple/src/main/java/org/baeldung/config/Application.java +++ b/spring-rest-simple/src/main/java/org/baeldung/config/Application.java @@ -2,12 +2,14 @@ package org.baeldung.config; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.web.support.SpringBootServletInitializer; import org.springframework.context.annotation.ComponentScan; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; @EnableAutoConfiguration @ComponentScan("org.baeldung") -public class Application extends WebMvcConfigurerAdapter { +@SpringBootApplication +public class Application extends SpringBootServletInitializer { public static void main(final String[] args) { SpringApplication.run(Application.class, args); diff --git a/spring-rest-simple/src/main/webapp/WEB-INF/web.xml b/spring-rest-simple/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index a439de8a05..0000000000 --- a/spring-rest-simple/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - Spring MVC Application - - - - contextClass - - org.springframework.web.context.support.AnnotationConfigWebApplicationContext - - - - contextConfigLocation - org.baeldung.config - - - - org.springframework.web.context.ContextLoaderListener - - - - - api - org.springframework.web.servlet.DispatcherServlet - 1 - - - api - / - - - - - - -