From a9a50b79f592474c32825ad1f56d99ec6fa13978 Mon Sep 17 00:00:00 2001 From: amit2103 Date: Mon, 12 Nov 2018 01:16:00 +0530 Subject: [PATCH] [BAEL-10234] - Removed deprecated properties --- spring-rest-full/src/main/resources/application.properties | 2 +- .../src/main/java/org/baeldung/spring/WebConfig.java | 5 ++--- .../src/main/resources/application.properties | 2 +- spring-rest-simple/pom.xml | 4 ++++ spring-rest-simple/src/main/resources/application.properties | 2 +- 5 files changed, 9 insertions(+), 6 deletions(-) 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