diff --git a/.gitignore b/.gitignore
index 1cfa6f5..77440ae 100644
--- a/.gitignore
+++ b/.gitignore
@@ -28,3 +28,4 @@ fabric.properties
git.properties
pom.xml.versionsBackup
application.yml
+target/
diff --git a/pom.xml b/pom.xml
index e38df86..b6e24d7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -30,6 +30,14 @@
+
+
+
+ jitpack.io
+ https://jitpack.io
+
+
+
org.projectlombok
@@ -84,6 +92,30 @@
compile
+
+
+ com.github.dnsjava
+ dnsjava
+ v3.5.2
+ compile
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-data-redis
+
+
+ io.lettuce
+ lettuce-core
+
+
+
+
+ redis.clients
+ jedis
+
+
org.junit.jupiter
@@ -108,6 +140,12 @@
spring-boot-starter-test
test
+
+ com.github.codemonstur
+ embedded-redis
+ 1.4.3
+ test
+
\ No newline at end of file
diff --git a/src/main/java/cc/fascinated/Main.java b/src/main/java/cc/fascinated/Main.java
deleted file mode 100644
index 5383feb..0000000
--- a/src/main/java/cc/fascinated/Main.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package cc.fascinated;
-
-import com.google.gson.Gson;
-import lombok.SneakyThrows;
-import lombok.extern.log4j.Log4j2;
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-
-import java.io.File;
-import java.net.http.HttpClient;
-import java.nio.file.Files;
-import java.nio.file.StandardCopyOption;
-import java.util.Objects;
-
-@SpringBootApplication @Log4j2
-public class Main {
-
- public static final Gson GSON = new Gson();
- public static final HttpClient HTTP_CLIENT = HttpClient.newHttpClient();
-
- @SneakyThrows
- public static void main(String[] args) {
- File config = new File("application.yml");
- if (!config.exists()) { // Saving the default config if it doesn't exist locally
- Files.copy(Objects.requireNonNull(Main.class.getResourceAsStream("/application.yml")), config.toPath(), StandardCopyOption.REPLACE_EXISTING);
- log.info("Saved the default configuration to '{}', please re-launch the application", // Log the default config being saved
- config.getAbsolutePath()
- );
- return;
- }
- log.info("Found configuration at '{}'", config.getAbsolutePath()); // Log the found config
-
- SpringApplication.run(Main.class, args);
- }
-}
\ No newline at end of file
diff --git a/src/main/java/cc/fascinated/common/IPUtils.java b/src/main/java/cc/fascinated/common/IPUtils.java
deleted file mode 100644
index eed9631..0000000
--- a/src/main/java/cc/fascinated/common/IPUtils.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package cc.fascinated.common;
-
-import jakarta.servlet.http.HttpServletRequest;
-import lombok.experimental.UtilityClass;
-
-@UtilityClass
-public class IPUtils {
- /**
- * The headers that contain the IP.
- */
- private static final String[] IP_HEADERS = new String[] {
- "CF-Connecting-IP",
- "X-Forwarded-For"
- };
-
- /**
- * Get the real IP from the given request.
- *
- * @param request the request
- * @return the real IP
- */
- public static String getRealIp(HttpServletRequest request) {
- String ip = request.getRemoteAddr();
- for (String headerName : IP_HEADERS) {
- String header = request.getHeader(headerName);
- if (header == null) {
- continue;
- }
- if (!header.contains(",")) { // Handle single IP
- ip = header;
- break;
- }
- // Handle multiple IPs
- String[] ips = header.split(",");
- for (String ipHeader : ips) {
- ip = ipHeader;
- break;
- }
- }
- return ip;
- }
-}
\ No newline at end of file
diff --git a/src/main/java/cc/fascinated/common/PlayerUtils.java b/src/main/java/cc/fascinated/common/PlayerUtils.java
deleted file mode 100644
index 246ed67..0000000
--- a/src/main/java/cc/fascinated/common/PlayerUtils.java
+++ /dev/null
@@ -1,72 +0,0 @@
-package cc.fascinated.common;
-
-import cc.fascinated.Main;
-import cc.fascinated.model.player.Skin;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import lombok.SneakyThrows;
-import lombok.experimental.UtilityClass;
-import lombok.extern.log4j.Log4j2;
-
-import javax.imageio.ImageIO;
-import java.awt.*;
-import java.awt.image.BufferedImage;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.net.URI;
-import java.net.http.HttpRequest;
-import java.net.http.HttpResponse;
-
-@UtilityClass @Log4j2
-public class PlayerUtils {
-
- /**
- * Gets the skin data from the URL.
- *
- * @return the skin data
- */
- @SneakyThrows
- @JsonIgnore
- public static BufferedImage getSkinImage(String url) {
- HttpResponse response = Main.HTTP_CLIENT.send(HttpRequest.newBuilder(URI.create(url)).build(),
- HttpResponse.BodyHandlers.ofByteArray());
- byte[] body = response.body();
- if (body == null) {
- return null;
- }
- return ImageIO.read(new ByteArrayInputStream(body));
- }
-
- /**
- * Gets the part data from the skin.
- *
- * @return the part data
- */
- public static byte[] getSkinPartBytes(Skin skin, Skin.Parts part, int size) {
- if (size == -1) {
- size = part.getDefaultSize();
- }
-
- try {
- BufferedImage image = skin.getSkinImage();
- if (image == null) {
- return null;
- }
- // Get the part of the image (e.g. the head)
- BufferedImage partImage = image.getSubimage(part.getX(), part.getY(), part.getWidth(), part.getHeight());
-
- // Scale the image
- BufferedImage scaledImage = new BufferedImage(size, size, partImage.getType());
- Graphics2D graphics2D = scaledImage.createGraphics();
- graphics2D.drawImage(partImage, 0, 0, size, size, null);
- graphics2D.dispose();
- partImage = scaledImage;
-
- ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
- ImageIO.write(partImage, "png", byteArrayOutputStream);
- return byteArrayOutputStream.toByteArray();
- } catch (Exception ex) {
- log.error("Failed to get {} part bytes for {}", part.name(), skin.getUrl(), ex);
- return null;
- }
- }
-}
diff --git a/src/main/java/cc/fascinated/common/Tuple.java b/src/main/java/cc/fascinated/common/Tuple.java
deleted file mode 100644
index d51de5d..0000000
--- a/src/main/java/cc/fascinated/common/Tuple.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package cc.fascinated.common;
-
-import lombok.AllArgsConstructor;
-import lombok.Getter;
-
-@Getter @AllArgsConstructor
-public class Tuple {
-
- /**
- * The left value of the tuple.
- */
- private final L left;
-
- /**
- * The right value of the tuple.
- */
- private final R right;
-}
diff --git a/src/main/java/cc/fascinated/common/UUIDUtils.java b/src/main/java/cc/fascinated/common/UUIDUtils.java
deleted file mode 100644
index 204f5cd..0000000
--- a/src/main/java/cc/fascinated/common/UUIDUtils.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package cc.fascinated.common;
-
-import lombok.experimental.UtilityClass;
-
-@UtilityClass
-public class UUIDUtils {
-
- /**
- * Add dashes to a UUID.
- *
- * @param idNoDashes the UUID without dashes
- * @return the UUID with dashes
- */
- public static String addUuidDashes(String idNoDashes) {
- StringBuilder idBuff = new StringBuilder(idNoDashes);
- idBuff.insert(20, '-');
- idBuff.insert(16, '-');
- idBuff.insert(12, '-');
- idBuff.insert(8, '-');
- return idBuff.toString();
- }
-}
diff --git a/src/main/java/cc/fascinated/common/WebRequest.java b/src/main/java/cc/fascinated/common/WebRequest.java
deleted file mode 100644
index dc5ef00..0000000
--- a/src/main/java/cc/fascinated/common/WebRequest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package cc.fascinated.common;
-
-import lombok.experimental.UtilityClass;
-import org.springframework.http.ResponseEntity;
-import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
-import org.springframework.web.client.HttpClientErrorException;
-import org.springframework.web.client.RestClient;
-
-@UtilityClass
-public class WebRequest {
-
- /**
- * The web client.
- */
- private static final RestClient CLIENT = RestClient.builder()
- .requestFactory(new HttpComponentsClientHttpRequestFactory())
- .build();
-
- /**
- * Gets a response from the given URL.
- *
- * @param url the url
- * @return the response
- * @param the type of the response
- */
- public static T getAsEntity(String url, Class clazz) {
- try {
- ResponseEntity profile = CLIENT.get()
- .uri(url)
- .retrieve()
- .toEntity(clazz);
-
- if (profile.getStatusCode().isError()) {
- return null;
- }
- return profile.getBody();
- } catch (HttpClientErrorException ex) {
- return null;
- }
- }
-}
diff --git a/src/main/java/cc/fascinated/common/packet/MinecraftJavaPacket.java b/src/main/java/cc/fascinated/common/packet/MinecraftJavaPacket.java
deleted file mode 100644
index 55d4dd9..0000000
--- a/src/main/java/cc/fascinated/common/packet/MinecraftJavaPacket.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package cc.fascinated.common.packet;
-
-import lombok.NonNull;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-/**
- * Represents a packet in the
- * Minecraft Java protocol.
- *
- * @author Braydon
- * @see Protocol Docs
- */
-public abstract class MinecraftJavaPacket {
- /**
- * Process this packet.
- *
- * @param inputStream the input stream to read from
- * @param outputStream the output stream to write to
- * @throws IOException if an I/O error occurs
- */
- public abstract void process(@NonNull DataInputStream inputStream, @NonNull DataOutputStream outputStream) throws IOException;
-
- /**
- * Write a variable integer to the output stream.
- *
- * @param outputStream the output stream to write to
- * @param paramInt the integer to write
- * @throws IOException if an I/O error occurs
- */
- protected final void writeVarInt(DataOutputStream outputStream, int paramInt) throws IOException {
- while (true) {
- if ((paramInt & 0xFFFFFF80) == 0) {
- outputStream.writeByte(paramInt);
- return;
- }
- outputStream.writeByte(paramInt & 0x7F | 0x80);
- paramInt >>>= 7;
- }
- }
-
- /**
- * Read a variable integer from the input stream.
- *
- * @param inputStream the input stream to read from
- * @return the integer that was read
- * @throws IOException if an I/O error occurs
- */
- protected final int readVarInt(@NonNull DataInputStream inputStream) throws IOException {
- int i = 0;
- int j = 0;
- while (true) {
- int k = inputStream.readByte();
- i |= (k & 0x7F) << j++ * 7;
- if (j > 5) {
- throw new RuntimeException("VarInt too big");
- }
- if ((k & 0x80) != 128) {
- break;
- }
- }
- return i;
- }
-}
\ No newline at end of file
diff --git a/src/main/java/cc/fascinated/common/packet/impl/java/JavaPacketHandshakingInSetProtocol.java b/src/main/java/cc/fascinated/common/packet/impl/java/JavaPacketHandshakingInSetProtocol.java
deleted file mode 100644
index d589ad2..0000000
--- a/src/main/java/cc/fascinated/common/packet/impl/java/JavaPacketHandshakingInSetProtocol.java
+++ /dev/null
@@ -1,64 +0,0 @@
-package cc.fascinated.common.packet.impl.java;
-
-import cc.fascinated.common.packet.MinecraftJavaPacket;
-import lombok.AllArgsConstructor;
-import lombok.NonNull;
-import lombok.ToString;
-
-import java.io.ByteArrayOutputStream;
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-/**
- * This packet is sent by the client to the server to set
- * the hostname, port, and protocol version of the client.
- *
- * @author Braydon
- * @see Protocol Docs
- */
-@AllArgsConstructor @ToString
-public final class JavaPacketHandshakingInSetProtocol extends MinecraftJavaPacket {
- private static final byte ID = 0x00; // The ID of the packet
- private static final int STATUS_HANDSHAKE = 1; // The status handshake ID
-
- /**
- * The hostname of the server.
- */
- @NonNull private final String hostname;
-
- /**
- * The port of the server.
- */
- private final int port;
-
- /**
- * The protocol version of the server.
- */
- private final int protocolVersion;
-
- /**
- * Process this packet.
- *
- * @param inputStream the input stream to read from
- * @param outputStream the output stream to write to
- * @throws IOException if an I/O error occurs
- */
- @Override
- public void process(@NonNull DataInputStream inputStream, @NonNull DataOutputStream outputStream) throws IOException {
- try (ByteArrayOutputStream handshakeBytes = new ByteArrayOutputStream();
- DataOutputStream handshake = new DataOutputStream(handshakeBytes)
- ) {
- handshake.writeByte(ID); // Write the ID of the packet
- writeVarInt(handshake, protocolVersion); // Write the protocol version
- writeVarInt(handshake, hostname.length()); // Write the length of the hostname
- handshake.writeBytes(hostname); // Write the hostname
- handshake.writeShort(port); // Write the port
- writeVarInt(handshake, STATUS_HANDSHAKE); // Write the status handshake ID
-
- // Write the handshake bytes to the output stream
- writeVarInt(outputStream, handshakeBytes.size());
- outputStream.write(handshakeBytes.toByteArray());
- }
- }
-}
\ No newline at end of file
diff --git a/src/main/java/cc/fascinated/common/packet/impl/java/JavaPacketStatusInStart.java b/src/main/java/cc/fascinated/common/packet/impl/java/JavaPacketStatusInStart.java
deleted file mode 100644
index bf3a540..0000000
--- a/src/main/java/cc/fascinated/common/packet/impl/java/JavaPacketStatusInStart.java
+++ /dev/null
@@ -1,62 +0,0 @@
-package cc.fascinated.common.packet.impl.java;
-
-import cc.fascinated.common.packet.MinecraftJavaPacket;
-import lombok.Getter;
-import lombok.NonNull;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-/**
- * This packet is sent by the client to the server to request the
- * status of the server. The server will respond with a json object
- * containing the server's status.
- *
- * @author Braydon
- * @see Protocol Docs
- */
-@Getter
-public final class JavaPacketStatusInStart extends MinecraftJavaPacket {
- private static final byte ID = 0x00; // The ID of the packet
-
- /**
- * The response json from the server, null if none.
- */
- private String response;
-
- /**
- * Process this packet.
- *
- * @param inputStream the input stream to read from
- * @param outputStream the output stream to write to
- * @throws IOException if an I/O error occurs
- */
- @Override
- public void process(@NonNull DataInputStream inputStream, @NonNull DataOutputStream outputStream) throws IOException {
- // Send the status request
- outputStream.writeByte(0x01); // Size of packet
- outputStream.writeByte(ID);
-
- // Read the status response
- readVarInt(inputStream); // Size of the response
- int id = readVarInt(inputStream);
- if (id == -1) { // The stream was prematurely ended
- throw new IOException("Server prematurely ended stream.");
- } else if (id != ID) { // Invalid packet ID
- throw new IOException("Server returned invalid packet ID.");
- }
-
- int length = readVarInt(inputStream); // Length of the response
- if (length == -1) { // The stream was prematurely ended
- throw new IOException("Server prematurely ended stream.");
- } else if (length == 0) {
- throw new IOException("Server returned unexpected value.");
- }
-
- // Get the json response
- byte[] data = new byte[length];
- inputStream.readFully(data);
- response = new String(data);
- }
-}
\ No newline at end of file
diff --git a/src/main/java/cc/fascinated/config/Config.java b/src/main/java/cc/fascinated/config/Config.java
deleted file mode 100644
index 2aac78f..0000000
--- a/src/main/java/cc/fascinated/config/Config.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package cc.fascinated.config;
-
-import jakarta.annotation.PostConstruct;
-import lombok.Getter;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.context.annotation.Configuration;
-
-@Configuration
-@Getter
-public class Config {
- public static Config INSTANCE;
-
- @Value("${public-url}")
- private String webPublicUrl;
-
- @PostConstruct
- public void onInitialize() {
- INSTANCE = this;
- }
-}
\ No newline at end of file
diff --git a/src/main/java/cc/fascinated/controller/HomeController.java b/src/main/java/cc/fascinated/controller/HomeController.java
deleted file mode 100644
index 854c1f6..0000000
--- a/src/main/java/cc/fascinated/controller/HomeController.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package cc.fascinated.controller;
-
-import cc.fascinated.config.Config;
-import org.springframework.stereotype.Controller;
-import org.springframework.ui.Model;
-import org.springframework.web.bind.annotation.RequestMapping;
-
-@Controller
-@RequestMapping(value = "/")
-public class HomeController {
-
- /**
- * The example UUID.
- */
- @SuppressWarnings("FieldCanBeLocal")
- private final String exampleUuid = "eeab5f8a-18dd-4d58-af78-2b3c4543da48";
-
- @RequestMapping(value = "/")
- public String home(Model model) {
- model.addAttribute("player_example_url", Config.INSTANCE.getWebPublicUrl() + "/player/" + exampleUuid);
- return "index";
- }
-}
diff --git a/src/main/java/cc/fascinated/controller/PlayerController.java b/src/main/java/cc/fascinated/controller/PlayerController.java
deleted file mode 100644
index 52bc8ec..0000000
--- a/src/main/java/cc/fascinated/controller/PlayerController.java
+++ /dev/null
@@ -1,65 +0,0 @@
-package cc.fascinated.controller;
-
-import cc.fascinated.common.PlayerUtils;
-import cc.fascinated.model.player.Player;
-import cc.fascinated.model.player.Skin;
-import cc.fascinated.model.response.impl.InvalidPartResponse;
-import cc.fascinated.model.response.impl.PlayerNotFoundResponse;
-import cc.fascinated.service.PlayerService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.CacheControl;
-import org.springframework.http.MediaType;
-import org.springframework.http.ResponseEntity;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.concurrent.TimeUnit;
-
-@RestController
-@RequestMapping(value = "/player/")
-public class PlayerController {
-
- private final CacheControl cacheControl = CacheControl.maxAge(1, TimeUnit.HOURS).cachePublic();
- private final PlayerService playerManagerService;
-
- @Autowired
- public PlayerController(PlayerService playerManagerService) {
- this.playerManagerService = playerManagerService;
- }
-
- @ResponseBody
- @GetMapping(value = "/{id}", produces = MediaType.APPLICATION_JSON_VALUE)
- public ResponseEntity> getPlayer(@PathVariable String id) {
- Player player = playerManagerService.getPlayer(id);
- if (player == null) { // No player with that id was found
- return new PlayerNotFoundResponse().toResponseEntity();
- }
- // Return the player
- return ResponseEntity.ok()
- .cacheControl(cacheControl)
- .body(player);
- }
-
- @GetMapping(value = "/{part}/{id}")
- public ResponseEntity> getPlayerHead(@PathVariable String part,
- @PathVariable String id,
- @RequestParam(required = false, defaultValue = "256") int size) {
- Player player = playerManagerService.getPlayer(id);
- byte[] partBytes = new byte[0];
- if (player != null) { // The player exists
- Skin skin = player.getSkin();
- Skin.Parts skinPart = Skin.Parts.fromName(part);
- if (skinPart == null) { // Unknown part name
- return new InvalidPartResponse().toResponseEntity();
- }
- partBytes = PlayerUtils.getSkinPartBytes(skin, skinPart, size);
- }
- if (partBytes == null) { // Fallback to the default head
- partBytes = PlayerUtils.getSkinPartBytes(Skin.DEFAULT_SKIN, Skin.Parts.HEAD, size);
- }
- // Return the part image
- return ResponseEntity.ok()
- .cacheControl(cacheControl)
- .contentType(MediaType.IMAGE_PNG)
- .body(partBytes);
- }
-}
diff --git a/src/main/java/cc/fascinated/controller/ServerController.java b/src/main/java/cc/fascinated/controller/ServerController.java
deleted file mode 100644
index 7adbd57..0000000
--- a/src/main/java/cc/fascinated/controller/ServerController.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package cc.fascinated.controller;
-
-import cc.fascinated.model.server.MinecraftServer;
-import cc.fascinated.service.pinger.impl.JavaMinecraftServerPinger;
-import org.springframework.http.MediaType;
-import org.springframework.http.ResponseEntity;
-import org.springframework.web.bind.annotation.*;
-
-@RestController
-@RequestMapping(value = "/server/")
-public class ServerController {
-
- @ResponseBody
- @GetMapping(value = "/{hostname}", produces = MediaType.APPLICATION_JSON_VALUE)
- public ResponseEntity getServer(@PathVariable String hostname) {
- return ResponseEntity.ok(JavaMinecraftServerPinger.INSTANCE.ping(hostname, 25565));
- }
-}
diff --git a/src/main/java/cc/fascinated/exception/ExceptionControllerAdvice.java b/src/main/java/cc/fascinated/exception/ExceptionControllerAdvice.java
deleted file mode 100644
index 423c43b..0000000
--- a/src/main/java/cc/fascinated/exception/ExceptionControllerAdvice.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package cc.fascinated.exception;
-
-import cc.fascinated.model.response.Response;
-import io.micrometer.common.lang.NonNull;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
-import org.springframework.web.bind.annotation.ControllerAdvice;
-import org.springframework.web.bind.annotation.ExceptionHandler;
-import org.springframework.web.bind.annotation.ResponseStatus;
-
-@ControllerAdvice
-public final class ExceptionControllerAdvice {
-
- /**
- * Handle a raised exception.
- *
- * @param ex the raised exception
- * @return the error response
- */
- @ExceptionHandler(Exception.class)
- public ResponseEntity> handleException(@NonNull Exception ex) {
- HttpStatus status = HttpStatus.INTERNAL_SERVER_ERROR; // Get the HTTP status
- if (ex.getClass().isAnnotationPresent(ResponseStatus.class)) { // Get from the @ResponseStatus annotation
- status = ex.getClass().getAnnotation(ResponseStatus.class).value();
- }
- String message = ex.getLocalizedMessage(); // Get the error message
- if (message == null) { // Fallback
- message = "An internal error has occurred.";
- }
- ex.printStackTrace(); // Print the stack trace
- return new Response(status, message).toResponseEntity(); // Return the error response
- }
-}
\ No newline at end of file
diff --git a/src/main/java/cc/fascinated/log/TransactionLogger.java b/src/main/java/cc/fascinated/log/TransactionLogger.java
deleted file mode 100644
index ab9de46..0000000
--- a/src/main/java/cc/fascinated/log/TransactionLogger.java
+++ /dev/null
@@ -1,78 +0,0 @@
-package cc.fascinated.log;
-
-import cc.fascinated.common.IPUtils;
-import jakarta.servlet.http.HttpServletRequest;
-import jakarta.servlet.http.HttpServletResponse;
-import lombok.NonNull;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.core.MethodParameter;
-import org.springframework.http.MediaType;
-import org.springframework.http.converter.HttpMessageConverter;
-import org.springframework.http.server.ServerHttpRequest;
-import org.springframework.http.server.ServerHttpResponse;
-import org.springframework.http.server.ServletServerHttpRequest;
-import org.springframework.http.server.ServletServerHttpResponse;
-import org.springframework.web.bind.annotation.ControllerAdvice;
-import org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice;
-
-import java.util.Arrays;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Map.Entry;
-
-@ControllerAdvice
-@Slf4j(topic = "Req/Res Transaction")
-public class TransactionLogger implements ResponseBodyAdvice