aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'juick-www/src/main')
-rw-r--r--juick-www/src/main/java/com/juick/www/configuration/WwwAppConfiguration.java10
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 a5bc3f736..2e5a4f898 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"));