• Andy Wilkinson's avatar
    Preserve ordering when auto-configuring WebSocket MessageConverters · fc2e51a7
    Andy Wilkinson authored
    Previously, WebSocketMessagingAutoConfiguration added a single
    additional converter. This was a MappingJackson2MessageConverter
    configured with the auto-configured ObjectMapper.
    AbstractMessageBrokerConfiguration places additional converters before
    any of the default converters. This meant that the auto-configuration
    had the unwanted side-effect of changing the ordering of the
    converters. A MappingJackson2MessageConverter was now first in the
    list, whereas, by default, it's last in the list after a
    StringMessageConverter and a ByteArrayMessageConverter.
    
    This commit updates WebSocketMessagingAutoConfiguration so that it
    switches off the registration of the default converters and registers
    a StringMessageConverter, ByteArrayMessageConverter and
    MappingJackson2MessageConverter in that order. A test has been
    added to verify that the types of these three converters match
    the types of the default converters. A second test that verifies
    that String responses are converted correctly has also been added
    alongside the existing test that verified the behaviour for JSON
    responses.
    
    Closes gh-5123
    fc2e51a7
Name
Last commit
Last update
.mvn Loading commit data...
eclipse Loading commit data...
spring-boot Loading commit data...
spring-boot-actuator Loading commit data...
spring-boot-actuator-docs Loading commit data...
spring-boot-autoconfigure Loading commit data...
spring-boot-cli Loading commit data...
spring-boot-dependencies Loading commit data...
spring-boot-deployment-tests Loading commit data...
spring-boot-devtools Loading commit data...
spring-boot-docs Loading commit data...
spring-boot-full-build Loading commit data...
spring-boot-integration-tests Loading commit data...
spring-boot-parent Loading commit data...
spring-boot-samples Loading commit data...
spring-boot-starters Loading commit data...
spring-boot-tools Loading commit data...
.gitignore Loading commit data...
.settings-template.xml Loading commit data...
.travis.yml Loading commit data...
CONTRIBUTING.adoc Loading commit data...
LICENSE.txt Loading commit data...
README.adoc Loading commit data...
mvnw Loading commit data...
mvnw.cmd Loading commit data...
pom.xml Loading commit data...