diff options
author | Vitaly Takmazov | 2017-06-23 10:47:19 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2017-06-23 11:00:02 +0300 |
commit | 2b6d46ff24f3e1e851fff7ffb4901a2366d17ec9 (patch) | |
tree | 03b505b98d09ebf1b2322d035b01474e199526eb /juick-www/src | |
parent | 077153155caf8f810d252cac48da82517424be80 (diff) |
fix tests and cleanup
Diffstat (limited to 'juick-www/src')
-rw-r--r-- | juick-www/src/main/java/com/juick/www/configuration/WwwAppConfiguration.java | 10 |
1 files changed, 1 insertions, 9 deletions
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<String, String> manifest = jsonMapper.readValue(manifestString, + HashMap<String, String> manifest = jsonMapper().readValue(manifestString, new TypeReference<HashMap<String, String>>() {}); app.setScriptsUrl(manifest.get("scripts.js")); app.setStyleUrl(manifest.get("style.css")); |