Skip to content

Commit

Permalink
Remove not needed PutAwareStandardServletMultiPartResolver since the …
Browse files Browse the repository at this point in the history
…Spring Web StandardServletMultipartResolver supports put
  • Loading branch information
filiphr committed Jul 25, 2023
1 parent e43ee58 commit 75436c2
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 100 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,14 @@

import java.util.List;

import org.flowable.common.rest.multipart.PutAwareStandardServletMultiPartResolver;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.web.multipart.MultipartResolver;
import org.springframework.web.multipart.support.StandardServletMultipartResolver;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

import com.fasterxml.jackson.databind.ObjectMapper;
Expand All @@ -32,14 +30,12 @@
@ComponentScan({ "org.flowable.app.rest.service.api" })
public class DispatcherServletConfiguration extends WebMvcConfigurationSupport {

private static final Logger LOGGER = LoggerFactory.getLogger(DispatcherServletConfiguration.class);

@Autowired
private ObjectMapper objectMapper;

@Bean
public MultipartResolver multipartResolver() {
return new PutAwareStandardServletMultiPartResolver();
return new StandardServletMultipartResolver();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,14 @@

import java.util.List;

import org.flowable.common.rest.multipart.PutAwareStandardServletMultiPartResolver;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.web.multipart.MultipartResolver;
import org.springframework.web.multipart.support.StandardServletMultipartResolver;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

import com.fasterxml.jackson.databind.ObjectMapper;
Expand All @@ -32,14 +30,12 @@
@ComponentScan({ "org.flowable.cmmn.rest.service.api" })
public class DispatcherServletConfiguration extends WebMvcConfigurationSupport {

private static final Logger LOGGER = LoggerFactory.getLogger(DispatcherServletConfiguration.class);

@Autowired
private ObjectMapper objectMapper;

@Bean
public MultipartResolver multipartResolver() {
return new PutAwareStandardServletMultiPartResolver();
return new StandardServletMultipartResolver();
}

@Override
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,14 @@

import java.util.List;

import org.flowable.common.rest.multipart.PutAwareStandardServletMultiPartResolver;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.web.multipart.MultipartResolver;
import org.springframework.web.multipart.support.StandardServletMultipartResolver;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

import com.fasterxml.jackson.databind.ObjectMapper;
Expand All @@ -32,14 +30,12 @@
@ComponentScan({ "org.flowable.dmn.rest.exception", "org.flowable.dmn.rest.service.api" })
public class DispatcherServletConfiguration extends WebMvcConfigurationSupport {

private static final Logger LOGGER = LoggerFactory.getLogger(DispatcherServletConfiguration.class);

@Autowired
private ObjectMapper objectMapper;

@Bean
public MultipartResolver multipartResolver() {
return new PutAwareStandardServletMultiPartResolver();
return new StandardServletMultipartResolver();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,14 @@

import java.util.List;

import org.flowable.common.rest.multipart.PutAwareStandardServletMultiPartResolver;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.web.multipart.MultipartResolver;
import org.springframework.web.multipart.support.StandardServletMultipartResolver;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

import com.fasterxml.jackson.databind.ObjectMapper;
Expand All @@ -32,14 +30,12 @@
@ComponentScan({ "org.flowable.eventregistry.rest.service.api" })
public class DispatcherServletConfiguration extends WebMvcConfigurationSupport {

private static final Logger LOGGER = LoggerFactory.getLogger(DispatcherServletConfiguration.class);

@Autowired
private ObjectMapper objectMapper;

@Bean
public MultipartResolver multipartResolver() {
return new PutAwareStandardServletMultiPartResolver();
return new StandardServletMultipartResolver();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,15 @@
import java.util.Collections;
import java.util.List;

import org.flowable.common.rest.multipart.PutAwareStandardServletMultiPartResolver;
import org.flowable.external.job.rest.service.api.ExternalJobRestResponseFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.web.multipart.MultipartResolver;
import org.springframework.web.multipart.support.StandardServletMultipartResolver;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

import com.fasterxml.jackson.databind.ObjectMapper;
Expand All @@ -37,8 +35,6 @@
})
public class DispatcherServletConfiguration extends WebMvcConfigurationSupport {

private static final Logger LOGGER = LoggerFactory.getLogger(DispatcherServletConfiguration.class);

@Autowired
private ObjectMapper objectMapper;

Expand All @@ -49,7 +45,7 @@ public ExternalJobRestResponseFactory externalJobRestResponseFactory(ObjectMappe

@Bean
public MultipartResolver multipartResolver() {
return new PutAwareStandardServletMultiPartResolver();
return new StandardServletMultipartResolver();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,14 @@

import java.util.List;

import org.flowable.common.rest.multipart.PutAwareStandardServletMultiPartResolver;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.web.multipart.MultipartResolver;
import org.springframework.web.multipart.support.StandardServletMultipartResolver;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

import com.fasterxml.jackson.databind.ObjectMapper;
Expand All @@ -32,14 +30,12 @@
@ComponentScan({ "org.flowable.rest.exception", "org.flowable.rest.service.api" })
public class DispatcherServletConfiguration extends WebMvcConfigurationSupport {

private static final Logger LOGGER = LoggerFactory.getLogger(DispatcherServletConfiguration.class);

@Autowired
private ObjectMapper objectMapper;

@Bean
public MultipartResolver multipartResolver() {
return new PutAwareStandardServletMultiPartResolver();
return new StandardServletMultipartResolver();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,13 @@
import java.util.List;

import org.flowable.common.rest.exception.BaseExceptionHandlerAdvice;
import org.flowable.common.rest.multipart.PutAwareStandardServletMultiPartResolver;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.web.servlet.MultipartProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.web.multipart.MultipartResolver;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

import com.fasterxml.jackson.databind.ObjectMapper;
Expand All @@ -41,18 +35,9 @@
@EnableAsync
public class DispatcherServletConfiguration extends WebMvcConfigurationSupport {

private static final Logger LOGGER = LoggerFactory.getLogger(DispatcherServletConfiguration.class);

@Autowired
protected ObjectMapper objectMapper;

@Bean
public MultipartResolver multipartResolver(MultipartProperties multipartProperties) {
PutAwareStandardServletMultiPartResolver multipartResolver = new PutAwareStandardServletMultiPartResolver();
multipartResolver.setResolveLazily(multipartProperties.isResolveLazily());
return multipartResolver;
}

@Override
public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
addDefaultHttpMessageConverters(converters);
Expand Down

0 comments on commit 75436c2

Please sign in to comment.