Skip to content

Commit

Permalink
Switch HttpMessageConverter lookup to test for domain type instead of…
Browse files Browse the repository at this point in the history
… PersistentEntityResource.

Fixes GH-2419.
  • Loading branch information
odrotbohm committed Oct 4, 2024
1 parent 9d7e555 commit 61a5d17
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.HttpMessageNotReadableException;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.http.server.ServerHttpRequest;
import org.springframework.http.server.ServletServerHttpRequest;
import org.springframework.plugin.core.PluginRegistry;
import org.springframework.util.Assert;
Expand Down Expand Up @@ -115,7 +114,7 @@ public Object resolveArgument(MethodParameter parameter, ModelAndViewContainer m

for (HttpMessageConverter converter : messageConverters) {

if (!converter.canRead(PersistentEntityResource.class, contentType)) {
if (!converter.canRead(domainType, contentType)) {
continue;
}

Expand Down

0 comments on commit 61a5d17

Please sign in to comment.