diff --git a/.forge/BAIS-E2E-MIG-001-attempt-2.md b/.forge/BAIS-E2E-MIG-001-attempt-2.md new file mode 100644 index 0000000..d5a8da7 --- /dev/null +++ b/.forge/BAIS-E2E-MIG-001-attempt-2.md @@ -0,0 +1,3 @@ +# BAIS-E2E-MIG-001-attempt-2 + +Forge 이슈 작업 브랜치 `forge/BAIS-E2E-MIG-001-attempt-2`. diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..eb18513 --- /dev/null +++ b/pom.xml @@ -0,0 +1,46 @@ + + + 4.0.0 + + com.example + bais-authorization-service + 1.0-SNAPSHOT + jar + + + 17 + + + + + org.springframework.boot + spring-boot-starter + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + ${java.version} + ${java.version} + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.22.2 + + + + \ No newline at end of file diff --git a/src/main/java/com/example/AuthorizationService.java b/src/main/java/com/example/AuthorizationService.java new file mode 100644 index 0000000..eac120a --- /dev/null +++ b/src/main/java/com/example/AuthorizationService.java @@ -0,0 +1,11 @@ +package com.example; + +import org.springframework.stereotype.Service; + +@Service +public class AuthorizationService { + public boolean hasAccess(String userId, String resource) { + // 권한 로직을 여기에 구현합니다. + return true; // 예시로 항상 true를 반환 + } +} \ No newline at end of file diff --git a/src/test/java/com/example/AuthorizationServiceTest.java b/src/test/java/com/example/AuthorizationServiceTest.java new file mode 100644 index 0000000..9315ee4 --- /dev/null +++ b/src/test/java/com/example/AuthorizationServiceTest.java @@ -0,0 +1,13 @@ +package com.example; + +import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertTrue; + +class AuthorizationServiceTest { + + @Test + void testHasAccess() { + AuthorizationService service = new AuthorizationService(); + assertTrue(service.hasAccess("user1", "resource1")); + } +} \ No newline at end of file