Skip to content

Commit 335368a

Browse files
author
kaleidox
committed
custom objectmapper
1 parent 32da1d2 commit 335368a

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/main/java/de/kaleidox/workbench/WorkbenchApplication.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package de.kaleidox.workbench;
22

3+
import com.fasterxml.jackson.core.JsonFactoryBuilder;
4+
import com.fasterxml.jackson.core.StreamReadFeature;
35
import com.fasterxml.jackson.databind.ObjectMapper;
46
import de.kaleidox.workbench.model.config.AppConfig;
57
import lombok.extern.java.Log;
@@ -36,6 +38,13 @@ public static void main(String[] args) {
3638
SpringApplication.run(WorkbenchApplication.class, args);
3739
}
3840

41+
@Bean
42+
public ObjectMapper objectMapper() {
43+
return new ObjectMapper(new JsonFactoryBuilder() {{
44+
enable(StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION);
45+
}}.build());
46+
}
47+
3948
@Bean
4049
public File configDir() {
4150
return new File("/srv/workbench/");

0 commit comments

Comments
 (0)