Minor refactors

This commit is contained in:
2025-12-05 21:47:17 +01:00
parent 97ace45f65
commit 7b03494e8b
12 changed files with 27 additions and 29 deletions

View File

@@ -51,12 +51,12 @@ tasks.register<Jar>("jarExternalApp") {
dependsOn("classes")
}
tasks.register<Jar>("jarHttpsServer") {
tasks.register<Jar>("jarHttpServer") {
manifest {
attributes["Main-Class"] = "Main"
}
archiveBaseName.set("httpsServer")
from(sourceSets["httpsServer"].output)
archiveBaseName.set("httpServer")
from(sourceSets["httpServer"].output)
dependsOn("classes")
}
@@ -64,7 +64,7 @@ tasks.named("build") {
dependsOn("jarAcq")
dependsOn("jarAcs")
dependsOn("jarExternalApp")
dependsOn("jarHttpsServer")
dependsOn("jarHttpServer")
}
group = "be.naaturel"

View File

@@ -1,10 +1,10 @@
package httpsServer.httpServer.src;
package httpServer.httpServer.src;
import com.sun.net.httpserver.HttpServer;
import common.common.src.logger.Logger;
import httpsServer.httpServer.src.handlers.IRequestHandler;
import httpsServer.httpServer.src.handlers.RequestHandler;
import httpsServer.httpServer.src.interceptors.RequestInterceptor;
import httpServer.httpServer.src.handlers.IRequestHandler;
import httpServer.httpServer.src.handlers.RequestHandler;
import httpServer.httpServer.src.interceptors.RequestInterceptor;
import java.io.*;
import java.lang.reflect.Proxy;

View File

@@ -1,4 +1,4 @@
package httpsServer.httpServer.src.annotations;
package httpServer.httpServer.src.annotations;
import java.lang.annotation.*;

View File

@@ -1,4 +1,4 @@
package httpsServer.httpServer.src.annotations;
package httpServer.httpServer.src.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;

View File

@@ -1,4 +1,4 @@
package httpsServer.httpServer.src.authorization;
package httpServer.httpServer.src.authorization;
import org.springframework.security.crypto.bcrypt.BCrypt;

View File

@@ -1,4 +1,4 @@
package httpsServer.httpServer.src.authorization;
package httpServer.httpServer.src.authorization;
import java.util.Objects;

View File

@@ -1,4 +1,4 @@
package httpsServer.httpServer.src.authorization;
package httpServer.httpServer.src.authorization;
import org.springframework.security.crypto.bcrypt.BCrypt;

View File

@@ -1,4 +1,4 @@
package httpsServer.httpServer.src.exceptions;
package httpServer.httpServer.src.exceptions;
public class ClientAuthorisationException extends Exception {

View File

@@ -1,4 +1,4 @@
package httpsServer.httpServer.src.exceptions;
package httpServer.httpServer.src.exceptions;
public class NoSuchVerbException extends Exception {

View File

@@ -1,4 +1,4 @@
package httpsServer.httpServer.src.handlers;
package httpServer.httpServer.src.handlers;
import com.sun.net.httpserver.HttpExchange;

View File

@@ -1,13 +1,13 @@
package httpsServer.httpServer.src.handlers;
package httpServer.httpServer.src.handlers;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.sun.net.httpserver.HttpExchange;
import common.common.src.html.HtmlManager;
import common.common.src.logger.Logger;
import httpsServer.httpServer.src.annotations.AllowedVerb;
import httpsServer.httpServer.src.annotations.OnlyAuthorizedClients;
import httpsServer.httpServer.src.authorization.AuthorizedClients;
import httpsServer.httpServer.src.authorization.Client;
import httpServer.httpServer.src.annotations.AllowedVerb;
import httpServer.httpServer.src.annotations.OnlyAuthorizedClients;
import httpServer.httpServer.src.authorization.AuthorizedClients;
import httpServer.httpServer.src.authorization.Client;
import java.io.*;
import java.nio.charset.StandardCharsets;

View File

@@ -1,16 +1,14 @@
package httpsServer.httpServer.src.interceptors;
package httpServer.httpServer.src.interceptors;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.sun.net.httpserver.HttpExchange;
import httpsServer.httpServer.src.annotations.AllowedVerb;
import httpsServer.httpServer.src.annotations.OnlyAuthorizedClients;
import httpsServer.httpServer.src.authorization.AuthorizedClients;
import httpsServer.httpServer.src.exceptions.NoSuchVerbException;
import httpsServer.httpServer.src.exceptions.ClientAuthorisationException;
import httpServer.httpServer.src.annotations.AllowedVerb;
import httpServer.httpServer.src.annotations.OnlyAuthorizedClients;
import httpServer.httpServer.src.authorization.AuthorizedClients;
import httpServer.httpServer.src.exceptions.NoSuchVerbException;
import httpServer.httpServer.src.exceptions.ClientAuthorisationException;
import java.io.IOException;
import java.lang.reflect.*;
import java.util.Base64;
public class RequestInterceptor implements InvocationHandler {