aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server/src/main')
-rw-r--r--juick-server/src/main/java/com/juick/ApiServer.java11
-rw-r--r--juick-server/src/main/java/com/juick/server/KeystoreManager.java2
-rw-r--r--juick-server/src/main/java/com/juick/server/XMPPServer.java7
-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.java3
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 cdd8bb202..fb2d97018 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 44b0b90e6..8bf93a7b9 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 f9d0169e8..86ab6a78d 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 7ba7405a8..81ab6960b 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 9f68032d8..e4612a848 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;