* Fix double @RequestMapping with empty value
* Fix code style
* Fix for review
* add author to SpringMvcContract
* split SpringMvcContractTests#testDoubleRequestMapping() test
* add support for an FeignErrorDecoderFactory
this factory will be used if no ErrorDecoder was found. This factory allows to create a ErrorDecoder based on the type. This fixes#308
* add assertions to make it more readable
* add test for checking to not overwrite an existing ErrorDecoder when provided in the configuration
* add test for checking to not overwrite an existing ErrorDecoder when provided in the configuration
* add test for checking to not overwrite an existing ErrorDecoder when provided in the configuration
Summary of changes follows:
- Delegate ALL requestBody encoding where Content-Type is multipart/form-data to the SpringFormEncoder.
- Introduce RequestPartParameterProcessor to deal with @RequestPart annotations, adds parameters to MethodMetadata.formParams().
- Wrap HttpMessageConversionException in EncodeException.
- Add tests to verify expected behaviour.
However there still exists a gap in functionality where any user defined pojo will be serialized as a Map<String,String>, as there is currently no way for SpringFormEncoder to know about the Content-Type of the individual parts beyond MultipartFile, boxed primitive types (which are treated as text/plain) and other built-in types inherited from FormEncoder.
Referring to @Configuration is a bit confusing. The referred class does not need the annotation, and actually using it could cause issues due the class additionally getting picked up by the component scan.
* Fix bug in SpringEncoder (#225)
This commit fixes a bug in the SpringEncoder that causes the bodyType to
be ignored and not passed to generic message converters.
Fixes gh-225
* Fix after cherry-pick.
* Add Ahmad Mozafarnia to authors.
* Refactor tests.
Co-authored-by: Ahmad Mozafarnia <ahmad.mozafarnia@gmail.com>
* Fix bug in SpringEncoder (#225)
This commit fixes a bug in the SpringEncoder that causes the bodyType to
be ignored and not passed to generic message converters.
Fixes gh-225
* Refactor changes based on Olga Maciaszek's review
* Add Ahmad Mozafarnia to authors.
Co-authored-by: Ahmad Mozafarnia <ahmad.mozafarnia@gmail.com>