From 30453e015d3c4c735e898951ddff5f1d7597d2c4 Mon Sep 17 00:00:00 2001 From: namdh861 Date: Wed, 12 Aug 2026 23:35:54 +0700 Subject: [PATCH] initial --- .gitignore | 33 +++++++++ pom.xml | 73 +++++++++++++++++++ .../exception/ResourceNotFoundException.java | 8 ++ .../core/common/response/ErrorResponse.java | 10 +++ 4 files changed, 124 insertions(+) create mode 100644 .gitignore create mode 100644 pom.xml create mode 100644 src/main/java/aplp/backend/core/common/exception/ResourceNotFoundException.java create mode 100644 src/main/java/aplp/backend/core/common/response/ErrorResponse.java diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1c5ca92 --- /dev/null +++ b/.gitignore @@ -0,0 +1,33 @@ +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ +.kotlin + +### IntelliJ IDEA ### +.idea/ + +### Eclipse ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ +!**/src/main/**/build/ +!**/src/test/**/build/ + +### VS Code ### +.vscode/ + +### Mac OS ### +.DS_Store \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..56cda53 --- /dev/null +++ b/pom.xml @@ -0,0 +1,73 @@ + + + 4.0.0 + + aplp.backend + core + 1.0-SNAPSHOT + + + 17 + 17 + UTF-8 + + 1.18.38 + 3.1.1 + 5.13.4 + + + + + + jakarta.validation + jakarta.validation-api + ${jakarta.validation.version} + + + + org.projectlombok + lombok + ${lombok.version} + provided + + + + org.junit.jupiter + junit-jupiter + ${junit.version} + test + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.14.0 + + ${maven.compiler.source} + ${maven.compiler.target} + + + + org.projectlombok + lombok + ${lombok.version} + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.5.3 + + + + + \ No newline at end of file diff --git a/src/main/java/aplp/backend/core/common/exception/ResourceNotFoundException.java b/src/main/java/aplp/backend/core/common/exception/ResourceNotFoundException.java new file mode 100644 index 0000000..6dfb46f --- /dev/null +++ b/src/main/java/aplp/backend/core/common/exception/ResourceNotFoundException.java @@ -0,0 +1,8 @@ +package aplp.backend.core.common.exception; + +public class ResourceNotFoundException extends RuntimeException { + + public ResourceNotFoundException(String message) { + super(message); + } +} \ No newline at end of file diff --git a/src/main/java/aplp/backend/core/common/response/ErrorResponse.java b/src/main/java/aplp/backend/core/common/response/ErrorResponse.java new file mode 100644 index 0000000..4e17dcb --- /dev/null +++ b/src/main/java/aplp/backend/core/common/response/ErrorResponse.java @@ -0,0 +1,10 @@ +package aplp.backend.core.common.response; + +import java.time.LocalDateTime; + +public record ErrorResponse( + int status, + String message, + LocalDateTime timestamp +) { +} \ No newline at end of file