aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main/java/com/juick/www/configuration
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-03-15 12:04:43 +0300
committerGravatar Vitaly Takmazov2018-03-15 12:04:43 +0300
commit70f481e2fe39a9029b1896d7b351293fd5de4ef8 (patch)
tree96c2fffec50231a078986012ffd7308db88ad039 /juick-www/src/main/java/com/juick/www/configuration
parentb2f3afebc7de684d1d49042f5f79a9cbf9c1f2f2 (diff)
www: WebApp refactoring
Diffstat (limited to 'juick-www/src/main/java/com/juick/www/configuration')
-rw-r--r--juick-www/src/main/java/com/juick/www/configuration/WwwAppConfiguration.java20
1 files changed, 0 insertions, 20 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 c30f5a92..e04538e8 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
@@ -17,14 +17,10 @@
package com.juick.www.configuration;
-import com.fasterxml.jackson.core.type.TypeReference;
-import com.fasterxml.jackson.databind.ObjectMapper;
import com.juick.service.CloudflareCache;
import com.juick.service.TagService;
import com.juick.service.UserService;
import com.juick.www.HelpService;
-import com.juick.www.WebApp;
-import org.apache.commons.io.IOUtils;
import org.commonmark.ext.autolink.AutolinkExtension;
import org.commonmark.node.Link;
import org.commonmark.parser.Parser;
@@ -36,10 +32,7 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import javax.inject.Inject;
-import java.io.IOException;
-import java.nio.charset.StandardCharsets;
import java.util.Collections;
-import java.util.HashMap;
/**
* Created by aalexeev on 11/22/16.
@@ -52,19 +45,6 @@ public class WwwAppConfiguration {
private UserService userService;
@Inject
private TagService tagService;
- @Inject
- private ObjectMapper jsonMapper;
-
- @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,
- new TypeReference<HashMap<String, String>>() {});
- app.setScriptsUrl(manifest.get("scripts.js"));
- app.setStyleUrl(manifest.get("style.css"));
- return app;
- }
@Bean
public CaffeineCacheManager cacheManager() {
return new CaffeineCacheManager("help");