From: Kai Moritz Date: Thu, 23 Jun 2016 07:04:55 +0000 (+0200) Subject: Added Spring-Autowireing-Annotations to SimpleMapperService X-Git-Tag: tmp~21 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=bc5adce373930dcf0e64b4d2cf7b4500fc84d7c5;p=maven-thymeleaf-skin Added Spring-Autowireing-Annotations to SimpleMapperService --- 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)