From bc5adce373930dcf0e64b4d2cf7b4500fc84d7c5 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Thu, 23 Jun 2016 09:04:55 +0200 Subject: [PATCH] Added Spring-Autowireing-Annotations to SimpleMapperService --- pom.xml | 7 +++++++ src/main/java/de/juplo/jackson/SimpleMapperService.java | 6 +++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ec1fc3a..f3fbdf4 100644 --- a/pom.xml +++ b/pom.xml @@ -38,6 +38,13 @@ slf4j-api + + + org.springframework + spring-webmvc + true + + diff --git a/src/main/java/de/juplo/jackson/SimpleMapperService.java b/src/main/java/de/juplo/jackson/SimpleMapperService.java index 3c1e197..a08d2f0 100644 --- a/src/main/java/de/juplo/jackson/SimpleMapperService.java +++ b/src/main/java/de/juplo/jackson/SimpleMapperService.java @@ -12,6 +12,8 @@ import java.util.List; import java.util.Map; import java.util.Spliterator; import java.util.stream.Stream; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; @@ -19,9 +21,11 @@ import java.util.stream.Stream; * * @author kai */ +@Component public class SimpleMapperService extends SimpleMapper { - private final JsonFactory factory; + @Autowired + private JsonFactory factory; public SimpleMapperService(JsonFactory factory) -- 2.20.1