Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.appsmith.util.JSONPrettyPrinter;
import com.appsmith.util.SerializationUtils;
import com.fasterxml.jackson.core.PrettyPrinter;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
Expand All @@ -18,6 +19,7 @@
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.util.StringUtils;
import reactor.core.scheduler.Scheduler;

Expand Down Expand Up @@ -103,6 +105,15 @@ public ObjectMapper objectMapper() {
return SerializationUtils.getDefaultObjectMapper(null);
}

@Bean
public MappingJackson2HttpMessageConverter mappingJackson2HttpMessageConverter() {
final MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter();

converter.setObjectMapper(objectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, true));

return converter;
}

@Bean
public Gson gsonInstance() {
GsonBuilder gsonBuilder = new GsonBuilder();
Expand Down
Loading