diff --git a/spring-rest-full/src/main/resources/application.properties b/spring-rest-full/src/main/resources/application.properties
index 6c7461f12c..52d93b4cff 100644
--- a/spring-rest-full/src/main/resources/application.properties
+++ b/spring-rest-full/src/main/resources/application.properties
@@ -1,3 +1,3 @@
server.port=8082
-server.context-path=/spring-rest-full
+server.servlet.context-path=/spring-rest-full
endpoints.metrics.enabled=true
\ No newline at end of file
diff --git a/spring-rest-query-language/src/main/java/org/baeldung/spring/WebConfig.java b/spring-rest-query-language/src/main/java/org/baeldung/spring/WebConfig.java
index 41711ee1ad..4139c69f95 100644
--- a/spring-rest-query-language/src/main/java/org/baeldung/spring/WebConfig.java
+++ b/spring-rest-query-language/src/main/java/org/baeldung/spring/WebConfig.java
@@ -6,13 +6,13 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.ViewResolver;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.servlet.view.InternalResourceViewResolver;
@Configuration
@ComponentScan("org.baeldung.web")
@EnableWebMvc
-public class WebConfig extends WebMvcConfigurerAdapter {
+public class WebConfig implements WebMvcConfigurer {
public WebConfig() {
super();
@@ -29,7 +29,6 @@ public class WebConfig extends WebMvcConfigurerAdapter {
// API
@Override
public void addViewControllers(final ViewControllerRegistry registry) {
- super.addViewControllers(registry);
registry.addViewController("/homepage.html");
}
diff --git a/spring-rest-query-language/src/main/resources/application.properties b/spring-rest-query-language/src/main/resources/application.properties
index 01eaee7040..4bbf3ed4fc 100644
--- a/spring-rest-query-language/src/main/resources/application.properties
+++ b/spring-rest-query-language/src/main/resources/application.properties
@@ -1,2 +1,2 @@
server.port=8082
-server.context-path=/spring-rest-query-language
\ No newline at end of file
+server.servlet.context-path=/spring-rest-query-language
\ No newline at end of file
diff --git a/spring-rest-simple/pom.xml b/spring-rest-simple/pom.xml
index f592fef237..d301957eb9 100644
--- a/spring-rest-simple/pom.xml
+++ b/spring-rest-simple/pom.xml
@@ -34,6 +34,10 @@
spring-boot-starter-test
test
+
+ org.springframework.boot
+ spring-boot-starter-web
+
diff --git a/spring-rest-simple/src/main/resources/application.properties b/spring-rest-simple/src/main/resources/application.properties
index 300589f561..dd7e4e2f2d 100644
--- a/spring-rest-simple/src/main/resources/application.properties
+++ b/spring-rest-simple/src/main/resources/application.properties
@@ -1,2 +1,2 @@
server.port= 8082
-server.context-path=/spring-rest
\ No newline at end of file
+server.servlet.context-path=/spring-rest
\ No newline at end of file