diff options
author | Vitaly Takmazov | 2018-09-27 23:14:55 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-09-27 23:14:55 +0300 |
commit | 017977b497abf5faf54f2c4be2b582133679a8aa (patch) | |
tree | 97827778c02332ae2f2323777858b0d070bd095d /juick-server/src/main/java/com/juick | |
parent | a4318f24d446fea480c0a869c86d3a666511ae2f (diff) |
code cleanup
Diffstat (limited to 'juick-server/src/main/java/com/juick')
-rw-r--r-- | juick-server/src/main/java/com/juick/ApiServer.java | 11 | ||||
-rw-r--r-- | juick-server/src/main/java/com/juick/server/KeystoreManager.java | 2 | ||||
-rw-r--r-- | juick-server/src/main/java/com/juick/server/XMPPServer.java | 7 | ||||
-rw-r--r-- | juick-server/src/main/java/com/juick/server/api/apple/AppSiteAssociation.java (renamed from juick-server/src/main/java/com/juick/server/www/controllers/AppSiteAssociation.java) | 2 | ||||
-rw-r--r-- | juick-server/src/main/java/com/juick/server/configuration/WwwAppConfiguration.java | 3 |
5 files changed, 6 insertions, 19 deletions
diff --git a/juick-server/src/main/java/com/juick/ApiServer.java b/juick-server/src/main/java/com/juick/ApiServer.java index cdd8bb20..fb2d9701 100644 --- a/juick-server/src/main/java/com/juick/ApiServer.java +++ b/juick-server/src/main/java/com/juick/ApiServer.java @@ -4,21 +4,12 @@ import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.mail.MailSenderAutoConfiguration; -import org.springframework.boot.builder.SpringApplicationBuilder; -import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; import org.springframework.context.annotation.ComponentScan; @SpringBootApplication @EnableAutoConfiguration(exclude = { MailSenderAutoConfiguration.class }) @ComponentScan(basePackages = {"com.juick.server", "com.juick.service"}) -public class ApiServer extends SpringBootServletInitializer { - - @Override - protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) { - setRegisterErrorPageFilter(false); - return builder.sources(ApiServer.class); - } - +public class ApiServer { public static void main(String[] args) { SpringApplication.run(ApiServer.class, args); } diff --git a/juick-server/src/main/java/com/juick/server/KeystoreManager.java b/juick-server/src/main/java/com/juick/server/KeystoreManager.java index 44b0b90e..8bf93a7b 100644 --- a/juick-server/src/main/java/com/juick/server/KeystoreManager.java +++ b/juick-server/src/main/java/com/juick/server/KeystoreManager.java @@ -28,7 +28,7 @@ public class KeystoreManager { private KeyManagerFactory kmf; @PostConstruct - public void init() throws GeneralSecurityException, IOException { + public void init() { try (InputStream ksIs = new FileInputStream(keystore)) { ks = KeyStore.getInstance("PKCS12"); ks.load(ksIs, keystorePassword.toCharArray()); diff --git a/juick-server/src/main/java/com/juick/server/XMPPServer.java b/juick-server/src/main/java/com/juick/server/XMPPServer.java index f9d0169e..86ab6a78 100644 --- a/juick-server/src/main/java/com/juick/server/XMPPServer.java +++ b/juick-server/src/main/java/com/juick/server/XMPPServer.java @@ -24,7 +24,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Value; import org.springframework.scheduling.annotation.Scheduled; -import org.springframework.stereotype.Component; import org.xmlpull.v1.XmlPullParserException; import rocks.xmpp.addr.Jid; import rocks.xmpp.core.stanza.model.Stanza; @@ -33,20 +32,18 @@ import javax.annotation.PostConstruct; import javax.annotation.PreDestroy; import javax.inject.Inject; import javax.net.ssl.*; -import java.security.InvalidAlgorithmParameterException; -import java.security.cert.*; import javax.xml.bind.JAXBException; import javax.xml.bind.Unmarshaller; -import java.io.FileInputStream; import java.io.IOException; -import java.io.InputStream; import java.io.StringReader; import java.net.ServerSocket; import java.net.Socket; import java.net.SocketException; +import java.security.InvalidAlgorithmParameterException; import java.security.KeyStore; import java.security.KeyStoreException; import java.security.SecureRandom; +import java.security.cert.*; import java.time.Duration; import java.time.Instant; import java.util.*; diff --git a/juick-server/src/main/java/com/juick/server/www/controllers/AppSiteAssociation.java b/juick-server/src/main/java/com/juick/server/api/apple/AppSiteAssociation.java index 7ba7405a..81ab6960 100644 --- a/juick-server/src/main/java/com/juick/server/www/controllers/AppSiteAssociation.java +++ b/juick-server/src/main/java/com/juick/server/api/apple/AppSiteAssociation.java @@ -1,4 +1,4 @@ -package com.juick.server.www.controllers; +package com.juick.server.api.apple; import org.springframework.beans.factory.annotation.Value; import org.springframework.web.bind.annotation.GetMapping; diff --git a/juick-server/src/main/java/com/juick/server/configuration/WwwAppConfiguration.java b/juick-server/src/main/java/com/juick/server/configuration/WwwAppConfiguration.java index 9f68032d..e4612a84 100644 --- a/juick-server/src/main/java/com/juick/server/configuration/WwwAppConfiguration.java +++ b/juick-server/src/main/java/com/juick/server/configuration/WwwAppConfiguration.java @@ -17,9 +17,9 @@ package com.juick.server.configuration; +import com.juick.server.www.HelpService; import com.juick.service.TagService; import com.juick.service.UserService; -import com.juick.server.www.HelpService; import com.mitchellbosecke.pebble.PebbleEngine; import com.mitchellbosecke.pebble.extension.FormatterExtension; import com.mitchellbosecke.pebble.loader.ClasspathLoader; @@ -35,7 +35,6 @@ 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.Import; import org.springframework.web.servlet.ViewResolver; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; |