aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--juick-common/src/main/java/com/juick/server/configuration/BaseWebConfiguration.java10
-rw-r--r--juick-server/src/test/java/com/juick/server/tests/ServerTests.java4
2 files changed, 2 insertions, 12 deletions
diff --git a/juick-common/src/main/java/com/juick/server/configuration/BaseWebConfiguration.java b/juick-common/src/main/java/com/juick/server/configuration/BaseWebConfiguration.java
index 9063e665..a80740e9 100644
--- a/juick-common/src/main/java/com/juick/server/configuration/BaseWebConfiguration.java
+++ b/juick-common/src/main/java/com/juick/server/configuration/BaseWebConfiguration.java
@@ -49,16 +49,6 @@ public class BaseWebConfiguration implements WebMvcConfigurer, SchedulingConfigu
public ResourceUrlEncodingFilter resourceUrlEncodingFilter() {
return new ResourceUrlEncodingFilter();
}
- @Bean
- public ObjectMapper jsonMapper() {
- ObjectMapper mapper = new ObjectMapper();
- mapper.setSerializationInclusion(JsonInclude.Include.NON_EMPTY);
- mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
- mapper.setSerializationInclusion(JsonInclude.Include.NON_DEFAULT);
- mapper.registerModule(new Jdk8Module());
- mapper.registerModule(new JavaTimeModule());
- return mapper;
- }
@Override
public void configureTasks(ScheduledTaskRegistrar taskRegistrar) {
diff --git a/juick-server/src/test/java/com/juick/server/tests/ServerTests.java b/juick-server/src/test/java/com/juick/server/tests/ServerTests.java
index ebca8c6c..840bebbb 100644
--- a/juick-server/src/test/java/com/juick/server/tests/ServerTests.java
+++ b/juick-server/src/test/java/com/juick/server/tests/ServerTests.java
@@ -393,7 +393,8 @@ public class ServerTests {
.andExpect(jsonPath("$[0].attachment.url",
is(String.format("https://i.juick.com/p/%d.png", msg.getMid()))))
.andExpect(jsonPath("$[0].attachment.small.url",
- is(String.format("https://i.juick.com/photos-512/%d.png", msg.getMid()))));
+ is(String.format("https://i.juick.com/photos-512/%d.png", msg.getMid()))))
+ .andExpect(jsonPath("$[0].user.avatar").doesNotExist());
}
@Test
@@ -1025,6 +1026,5 @@ public class ServerTests {
Attachment attachment = imageUtils.getAttachment(new File(getClass().getClassLoader().getResource("Transparent.gif").toURI()));
assertThat(attachment.getHeight(), is(1));
assertThat(attachment.getWidth(), is(1));
-
}
}