Skip to content

Commit

Permalink
Update Spring Framework and Spring Security to version 5.2.0 and Spri…
Browse files Browse the repository at this point in the history
…ng Boot to version 2.2.0.
  • Loading branch information
PascalSchumacher committed Sep 11, 2019
1 parent 7b86c52 commit 1e88c2f
Show file tree
Hide file tree
Showing 17 changed files with 62 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,17 @@
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.format.support.FormattingConversionService;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.web.accept.ContentNegotiationManager;
import org.springframework.web.multipart.MultipartResolver;
import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
import org.springframework.web.servlet.i18n.LocaleChangeInterceptor;
import org.springframework.web.servlet.i18n.SessionLocaleResolver;
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping;
import org.springframework.web.servlet.resource.ResourceUrlProvider;

import com.fasterxml.jackson.databind.ObjectMapper;

Expand Down Expand Up @@ -59,9 +62,9 @@ public MultipartResolver multipartResolver() {
return new PutAwareStandardServletMultiPartResolver();
}

@Bean
@Override
public RequestMappingHandlerMapping requestMappingHandlerMapping() {
public RequestMappingHandlerMapping requestMappingHandlerMapping(ContentNegotiationManager mvcContentNegotiationManager,
FormattingConversionService mvcConversionService, ResourceUrlProvider mvcResourceUrlProvider) {
LOGGER.debug("Creating requestMappingHandlerMapping");
RequestMappingHandlerMapping requestMappingHandlerMapping = new RequestMappingHandlerMapping();
requestMappingHandlerMapping.setUseSuffixPatternMatch(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ public class FlowableRestApplicationSecurityTest {
Arrays.asList(
"self",
"flowable",
"auditevents",
"beans",
"health",
"conditions",
Expand All @@ -72,7 +71,6 @@ public class FlowableRestApplicationSecurityTest {
"metrics",
"metrics-requiredMetricName",
"scheduledtasks",
"httptrace",
"mappings",
"caches",
"caches-cache",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,17 @@
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.format.support.FormattingConversionService;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.web.accept.ContentNegotiationManager;
import org.springframework.web.multipart.MultipartResolver;
import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
import org.springframework.web.servlet.i18n.LocaleChangeInterceptor;
import org.springframework.web.servlet.i18n.SessionLocaleResolver;
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping;
import org.springframework.web.servlet.resource.ResourceUrlProvider;

import com.fasterxml.jackson.databind.ObjectMapper;

Expand Down Expand Up @@ -59,9 +62,9 @@ public MultipartResolver multipartResolver() {
return new PutAwareStandardServletMultiPartResolver();
}

@Bean
@Override
public RequestMappingHandlerMapping requestMappingHandlerMapping() {
public RequestMappingHandlerMapping requestMappingHandlerMapping(ContentNegotiationManager mvcContentNegotiationManager,
FormattingConversionService mvcConversionService, ResourceUrlProvider mvcResourceUrlProvider) {
LOGGER.debug("Creating requestMappingHandlerMapping");
RequestMappingHandlerMapping requestMappingHandlerMapping = new RequestMappingHandlerMapping();
requestMappingHandlerMapping.setUseSuffixPatternMatch(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,17 @@
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.format.support.FormattingConversionService;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.web.accept.ContentNegotiationManager;
import org.springframework.web.multipart.MultipartResolver;
import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
import org.springframework.web.servlet.i18n.LocaleChangeInterceptor;
import org.springframework.web.servlet.i18n.SessionLocaleResolver;
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping;
import org.springframework.web.servlet.resource.ResourceUrlProvider;

import com.fasterxml.jackson.databind.ObjectMapper;

Expand Down Expand Up @@ -59,9 +62,9 @@ public MultipartResolver multipartResolver() {
return new PutAwareStandardServletMultiPartResolver();
}

@Bean
@Override
public RequestMappingHandlerMapping requestMappingHandlerMapping() {
public RequestMappingHandlerMapping requestMappingHandlerMapping(ContentNegotiationManager mvcContentNegotiationManager,
FormattingConversionService mvcConversionService, ResourceUrlProvider mvcResourceUrlProvider) {
LOGGER.debug("Creating requestMappingHandlerMapping");
RequestMappingHandlerMapping requestMappingHandlerMapping = new RequestMappingHandlerMapping();
requestMappingHandlerMapping.setUseSuffixPatternMatch(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,17 @@
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.format.support.FormattingConversionService;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.web.accept.ContentNegotiationManager;
import org.springframework.web.multipart.MultipartResolver;
import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
import org.springframework.web.servlet.i18n.LocaleChangeInterceptor;
import org.springframework.web.servlet.i18n.SessionLocaleResolver;
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping;
import org.springframework.web.servlet.resource.ResourceUrlProvider;

import com.fasterxml.jackson.databind.ObjectMapper;

Expand Down Expand Up @@ -59,9 +62,9 @@ public MultipartResolver multipartResolver() {
return new PutAwareStandardServletMultiPartResolver();
}

@Bean
@Override
public RequestMappingHandlerMapping requestMappingHandlerMapping() {
public RequestMappingHandlerMapping requestMappingHandlerMapping(ContentNegotiationManager mvcContentNegotiationManager,
FormattingConversionService mvcConversionService, ResourceUrlProvider mvcResourceUrlProvider) {
LOGGER.debug("Creating requestMappingHandlerMapping");
RequestMappingHandlerMapping requestMappingHandlerMapping = new RequestMappingHandlerMapping();
requestMappingHandlerMapping.setUseSuffixPatternMatch(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,17 @@
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.format.support.FormattingConversionService;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.web.accept.ContentNegotiationManager;
import org.springframework.web.multipart.MultipartResolver;
import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
import org.springframework.web.servlet.i18n.LocaleChangeInterceptor;
import org.springframework.web.servlet.i18n.SessionLocaleResolver;
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping;
import org.springframework.web.servlet.resource.ResourceUrlProvider;

import java.util.List;

Expand Down Expand Up @@ -58,9 +61,9 @@ public MultipartResolver multipartResolver() {
return new PutAwareStandardServletMultiPartResolver();
}

@Bean
@Override
public RequestMappingHandlerMapping requestMappingHandlerMapping() {
public RequestMappingHandlerMapping requestMappingHandlerMapping(ContentNegotiationManager mvcContentNegotiationManager,
FormattingConversionService mvcConversionService, ResourceUrlProvider mvcResourceUrlProvider) {
LOGGER.debug("Creating requestMappingHandlerMapping");
RequestMappingHandlerMapping requestMappingHandlerMapping = new RequestMappingHandlerMapping();
requestMappingHandlerMapping.setUseSuffixPatternMatch(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,17 @@
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.format.support.FormattingConversionService;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.web.accept.ContentNegotiationManager;
import org.springframework.web.multipart.MultipartResolver;
import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
import org.springframework.web.servlet.i18n.LocaleChangeInterceptor;
import org.springframework.web.servlet.i18n.SessionLocaleResolver;
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping;
import org.springframework.web.servlet.resource.ResourceUrlProvider;

import com.fasterxml.jackson.databind.ObjectMapper;

Expand Down Expand Up @@ -59,9 +62,9 @@ public MultipartResolver multipartResolver() {
return new PutAwareStandardServletMultiPartResolver();
}

@Bean
@Override
public RequestMappingHandlerMapping requestMappingHandlerMapping() {
public RequestMappingHandlerMapping requestMappingHandlerMapping(ContentNegotiationManager mvcContentNegotiationManager,
FormattingConversionService mvcConversionService, ResourceUrlProvider mvcResourceUrlProvider) {
LOGGER.debug("Creating requestMappingHandlerMapping");
RequestMappingHandlerMapping requestMappingHandlerMapping = new RequestMappingHandlerMapping();
requestMappingHandlerMapping.setUseSuffixPatternMatch(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,18 @@
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.format.support.FormattingConversionService;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.web.accept.ContentNegotiationManager;
import org.springframework.web.multipart.MultipartResolver;
import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
import org.springframework.web.servlet.i18n.LocaleChangeInterceptor;
import org.springframework.web.servlet.i18n.SessionLocaleResolver;
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping;
import org.springframework.web.servlet.resource.ResourceUrlProvider;

import com.fasterxml.jackson.databind.ObjectMapper;

Expand Down Expand Up @@ -70,9 +73,9 @@ public MultipartResolver multipartResolver() {
return multipartResolver;
}

@Bean
@Override
public RequestMappingHandlerMapping requestMappingHandlerMapping() {
public RequestMappingHandlerMapping requestMappingHandlerMapping(ContentNegotiationManager mvcContentNegotiationManager,
FormattingConversionService mvcConversionService, ResourceUrlProvider mvcResourceUrlProvider) {
LOGGER.debug("Creating requestMappingHandlerMapping");
RequestMappingHandlerMapping requestMappingHandlerMapping = new RequestMappingHandlerMapping();
requestMappingHandlerMapping.setUseSuffixPatternMatch(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public void testNoRedeploymentForSpringContainerRestart() throws Exception {
public void testResourceRedeploymentAfterProcessDefinitionChange() throws Exception {
createAppContext(CTX_PATH);
assertEquals(1, repositoryService.createDeploymentQuery().count());
((AbstractXmlApplicationContext) applicationContext).destroy();
((AbstractXmlApplicationContext) applicationContext).close();

String filePath = "org/flowable/spring/test/autodeployment/autodeploy.a.bpmn20.xml";
String originalBpmnFileContent = IoUtil.readFileAsString(filePath);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ public class FlowableAdminApplicationSecurityTest {
private static final Set<String> ACTUATOR_LINKS = new HashSet<>(
Arrays.asList(
"self",
"auditevents",
"beans",
"health",
"conditions",
Expand All @@ -74,7 +73,6 @@ public class FlowableAdminApplicationSecurityTest {
"metrics",
"metrics-requiredMetricName",
"scheduledtasks",
"httptrace",
"mappings",
"caches",
"caches-cache",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ public class FlowableIdmApplicationSecurityTest {
private static final Set<String> ACTUATOR_LINKS = new HashSet<>(
Arrays.asList(
"self",
"auditevents",
"beans",
"health",
"conditions",
Expand All @@ -76,7 +75,6 @@ public class FlowableIdmApplicationSecurityTest {
"metrics",
"metrics-requiredMetricName",
"scheduledtasks",
"httptrace",
"mappings",
"caches",
"caches-cache",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,15 @@
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.format.support.FormattingConversionService;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.web.accept.ContentNegotiationManager;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
import org.springframework.web.servlet.i18n.SessionLocaleResolver;
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping;
import org.springframework.web.servlet.resource.ResourceUrlProvider;

import com.fasterxml.jackson.databind.ObjectMapper;

Expand All @@ -40,12 +43,13 @@ public SessionLocaleResolver localeResolver() {
return new SessionLocaleResolver();
}

@Bean
public RequestMappingHandlerMapping requestMappingHandlerMapping() {
@Override
public RequestMappingHandlerMapping requestMappingHandlerMapping(ContentNegotiationManager mvcContentNegotiationManager,
FormattingConversionService mvcConversionService, ResourceUrlProvider mvcResourceUrlProvider) {
RequestMappingHandlerMapping requestMappingHandlerMapping = new RequestMappingHandlerMapping();
requestMappingHandlerMapping.setUseSuffixPatternMatch(false);
requestMappingHandlerMapping.setRemoveSemicolonContent(false);
requestMappingHandlerMapping.setInterceptors(getInterceptors());
requestMappingHandlerMapping.setInterceptors(getInterceptors(mvcConversionService, mvcResourceUrlProvider));
return requestMappingHandlerMapping;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public LocaleChangeInterceptor localeChangeInterceptor() {
return localeChangeInterceptor;
}

@Override
public RequestMappingHandlerMapping getRequestMappingHandlerMapping() {
LOGGER.debug("Creating requestMappingHandlerMapping");
RequestMappingHandlerMapping requestMappingHandlerMapping = new RequestMappingHandlerMapping();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ public class FlowableModelerApplicationSecurityTest {
private static final Set<String> ACTUATOR_LINKS = new HashSet<>(
Arrays.asList(
"self",
"auditevents",
"beans",
"health",
"conditions",
Expand All @@ -74,7 +73,6 @@ public class FlowableModelerApplicationSecurityTest {
"metrics",
"metrics-requiredMetricName",
"scheduledtasks",
"httptrace",
"mappings",
"caches",
"caches-cache",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,15 @@
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.format.support.FormattingConversionService;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.web.accept.ContentNegotiationManager;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
import org.springframework.web.servlet.i18n.SessionLocaleResolver;
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping;
import org.springframework.web.servlet.resource.ResourceUrlProvider;

import com.fasterxml.jackson.databind.ObjectMapper;

Expand All @@ -40,12 +43,13 @@ public SessionLocaleResolver localeResolver() {
return new SessionLocaleResolver();
}

@Bean
public RequestMappingHandlerMapping requestMappingHandlerMapping() {
@Override
public RequestMappingHandlerMapping requestMappingHandlerMapping(ContentNegotiationManager mvcContentNegotiationManager,
FormattingConversionService mvcConversionService, ResourceUrlProvider mvcResourceUrlProvider) {
RequestMappingHandlerMapping requestMappingHandlerMapping = new RequestMappingHandlerMapping();
requestMappingHandlerMapping.setUseSuffixPatternMatch(false);
requestMappingHandlerMapping.setRemoveSemicolonContent(false);
requestMappingHandlerMapping.setInterceptors(getInterceptors());
requestMappingHandlerMapping.setInterceptors(getInterceptors(mvcConversionService, mvcResourceUrlProvider));
return requestMappingHandlerMapping;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ public class FlowableTaskApplicationSecurityTest {
private static final Set<String> ACTUATOR_LINKS = new HashSet<>(
Arrays.asList(
"self",
"auditevents",
"beans",
"health",
"conditions",
Expand All @@ -74,7 +73,6 @@ public class FlowableTaskApplicationSecurityTest {
"metrics",
"metrics-requiredMetricName",
"scheduledtasks",
"httptrace",
"flowable",
"mappings",
"caches",
Expand Down
Loading

0 comments on commit 1e88c2f

Please sign in to comment.