From 2b6d46ff24f3e1e851fff7ffb4901a2366d17ec9 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 23 Jun 2017 10:47:19 +0300 Subject: fix tests and cleanup --- .../java/com/juick/www/configuration/WwwAppConfiguration.java | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'juick-www/src/main/java/com/juick/www') diff --git a/juick-www/src/main/java/com/juick/www/configuration/WwwAppConfiguration.java b/juick-www/src/main/java/com/juick/www/configuration/WwwAppConfiguration.java index a5bc3f73..2e5a4f89 100644 --- a/juick-www/src/main/java/com/juick/www/configuration/WwwAppConfiguration.java +++ b/juick-www/src/main/java/com/juick/www/configuration/WwwAppConfiguration.java @@ -10,13 +10,11 @@ import com.juick.www.HelpService; import com.juick.www.WebApp; import com.juick.www.controllers.PageTemplates; import org.apache.commons.io.IOUtils; -import org.springframework.beans.factory.annotation.Value; import org.springframework.cache.annotation.EnableCaching; import org.springframework.cache.caffeine.CaffeineCacheManager; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.PropertySource; -import org.springframework.core.env.Environment; import javax.annotation.Resource; import javax.inject.Inject; @@ -31,22 +29,16 @@ import java.util.HashMap; @PropertySource("classpath:juick.conf") @EnableCaching public class WwwAppConfiguration { - @Resource - private Environment env; @Inject private UserService userService; @Inject private TagService tagService; - @Inject - private ObjectMapper jsonMapper; - @Value("#{servletContext.contextPath}") - private String servletContextPath; @Bean public WebApp webApp() throws IOException { WebApp app = new WebApp(); String manifestString = IOUtils.toString(getClass().getClassLoader().getResourceAsStream("manifest.json"), StandardCharsets.UTF_8); - HashMap manifest = jsonMapper.readValue(manifestString, + HashMap manifest = jsonMapper().readValue(manifestString, new TypeReference>() {}); app.setScriptsUrl(manifest.get("scripts.js")); app.setStyleUrl(manifest.get("style.css")); -- cgit v1.2.3