BAEL-3804: Update spring-mvc-java to use latest Spring Boot version (#8747)

This commit is contained in:
kwoyke 2020-02-19 22:34:10 +01:00 committed by GitHub
parent 67f29a37cd
commit 1ad0bfaf29
4 changed files with 9 additions and 11 deletions

View File

@ -223,8 +223,6 @@
</profiles> </profiles>
<properties> <properties>
<spring-boot.version>2.1.9.RELEASE</spring-boot.version>
<thymeleaf.version>3.0.9.RELEASE</thymeleaf.version> <thymeleaf.version>3.0.9.RELEASE</thymeleaf.version>
<!-- persistence --> <!-- persistence -->

View File

@ -1,17 +1,17 @@
package com.baeldung.spring.web.config; package com.baeldung.spring.web.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.PathMatchConfigurer;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport; import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping;
@Configuration @Configuration
public class CustomWebMvcConfigurationSupport extends WebMvcConfigurationSupport { public class CustomWebMvcConfigurationSupport extends WebMvcConfigurationSupport {
@Bean @Override
public RequestMappingHandlerMapping requestMappingHandlerMapping() { protected PathMatchConfigurer getPathMatchConfigurer() {
RequestMappingHandlerMapping handlerMapping = super.requestMappingHandlerMapping(); PathMatchConfigurer pathMatchConfigurer = super.getPathMatchConfigurer();
handlerMapping.setUseSuffixPatternMatch(false); pathMatchConfigurer.setUseSuffixPatternMatch(false);
return handlerMapping;
return pathMatchConfigurer;
} }
} }

View File

@ -32,7 +32,7 @@ public class GreetControllerIntegrationTest {
private MockMvc mockMvc; private MockMvc mockMvc;
private static final String CONTENT_TYPE = "application/json;charset=UTF-8"; private static final String CONTENT_TYPE = "application/json";
@Before @Before
public void setup() throws Exception { public void setup() throws Exception {

View File

@ -16,7 +16,7 @@ import org.springframework.test.web.servlet.setup.MockMvcBuilders;
public class GreetControllerUnitTest { public class GreetControllerUnitTest {
private MockMvc mockMvc; private MockMvc mockMvc;
private static final String CONTENT_TYPE = "application/json;charset=UTF-8"; private static final String CONTENT_TYPE = "application/json";
@Before @Before
public void setup() { public void setup() {