init: 클린 기반 auth 서버 설계

This commit is contained in:
DongHyeonka
2026-07-24 14:30:18 +09:00
parent 471db0203d
commit 8a1ac1e769
3642 changed files with 275893 additions and 1 deletions
Binary file not shown.
+52
View File
@@ -0,0 +1,52 @@
# bootstrap AGENTS
Role:
- compose the Spring Boot application
- register security, filter, configuration, entrypoints
- translate framework/technical exceptions that inner layers must not know
Allowed:
- `@Configuration`
- `SecurityFilterChain`
- filter/interceptor registration
- app startup wiring
- migration entrypoint
- outer technical adapters for HTTP/security boundary
Forbidden:
- business rules
- repository-driven use case logic
- response shaping logic
- domain policy decisions
- hardcoded business semantics
Rules:
- bootstrap wires flow; it does not own business meaning
- use Filter for servlet-wide concern
- use Interceptor for MVC flow concern
- use Advice only when the dependency direction remains valid
- if exception translation would create `presentation -> infrastructure`, keep it here
- trace/request context setup belongs here, not in dto/model
Read first:
- `/docs/architecture/README.md`
- `/docs/standards/spring/filter-interceptor-resolver-advice.md`
- `/docs/standards/spring/bean-registration.md`
- `/docs/standards/spring/dependency-injection.md`
- `/docs/standards/spring/configuration-properties.md`
- `/docs/standards/observability/trace-principal-path-recording.md`
- `/docs/standards/observability/log-level.md`
- `/docs/standards/observability/exception-log.md`
- `/docs/standards/testing/springboottest-usage.md`
- `/docs/standards/testing/mock-usage.md`
- `/docs/standards/db/migration.md`
Examples:
- `/docs/examples/spring/filter-interceptor-resolver-advice.md`
- `/docs/examples/spring/bean-registration.md`
- `/docs/examples/spring/dependency-injection.md`
- `/docs/examples/spring/configuration-properties.md`
- `/docs/examples/observability/trace-principal-path-recording.md`
- `/docs/examples/testing/springboottest-usage.md`
- `/docs/examples/testing/mock-usage.md`
- `/docs/examples/db/migration.md`
@@ -0,0 +1,55 @@
{
"groups": [
{
"name": "app.docs",
"type": "com.project.auth.config.openapi.AppDocsProperties",
"sourceType": "com.project.auth.config.openapi.AppDocsProperties"
},
{
"name": "app.logging.access",
"type": "com.project.auth.config.web.AccessLogProperties",
"sourceType": "com.project.auth.config.web.AccessLogProperties"
},
{
"name": "app.persistence.migration",
"type": "com.project.auth.config.persistence.MigrationProperties",
"sourceType": "com.project.auth.config.persistence.MigrationProperties"
}
],
"properties": [
{
"name": "app.docs.description",
"type": "java.lang.String",
"sourceType": "com.project.auth.config.openapi.AppDocsProperties"
},
{
"name": "app.docs.title",
"type": "java.lang.String",
"sourceType": "com.project.auth.config.openapi.AppDocsProperties"
},
{
"name": "app.docs.version",
"type": "java.lang.String",
"sourceType": "com.project.auth.config.openapi.AppDocsProperties"
},
{
"name": "app.logging.access.excluded-path-prefixes",
"type": "java.util.List<java.lang.String>",
"sourceType": "com.project.auth.config.web.AccessLogProperties"
},
{
"name": "app.persistence.migration.location",
"type": "java.lang.String",
"sourceType": "com.project.auth.config.persistence.MigrationProperties"
},
{
"name": "app.persistence.migration.schema",
"type": "java.lang.String",
"sourceType": "com.project.auth.config.persistence.MigrationProperties"
}
],
"hints": [],
"ignored": {
"properties": []
}
}
+43
View File
@@ -0,0 +1,43 @@
import org.gradle.api.JavaVersion
import org.springframework.boot.gradle.tasks.bundling.BootJar
dependencies {
implementation project(':application')
implementation project(':presentation')
implementation project(':infrastructure')
implementation 'org.springframework.boot:spring-boot-starter'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server'
implementation 'org.springframework.security:spring-security-oauth2-jose'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation libs.springdoc.openapi.webmvc.ui
compileOnly project(':domain')
compileOnly 'org.flywaydb:flyway-core'
compileOnly 'jakarta.persistence:jakarta.persistence-api'
compileOnly 'jakarta.servlet:jakarta.servlet-api'
runtimeOnly 'com.h2database:h2'
runtimeOnly 'org.postgresql:postgresql'
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.boot:spring-boot-starter-data-jpa'
testImplementation 'org.springframework.security:spring-security-test'
testImplementation 'jakarta.servlet:jakarta.servlet-api'
testImplementation 'jakarta.persistence:jakarta.persistence-api'
testImplementation 'com.tngtech.archunit:archunit-junit5:1.4.1'
testImplementation 'org.testcontainers:junit-jupiter:1.20.4'
testImplementation 'org.testcontainers:postgresql:1.20.4'
testImplementation 'org.flywaydb:flyway-core'
testImplementation project(':domain')
testRuntimeOnly 'com.h2database:h2'
testRuntimeOnly 'org.postgresql:postgresql'
testRuntimeOnly 'org.flywaydb:flyway-database-postgresql'
}
tasks.register("migrationBootJar", BootJar) {
group = "build"
archiveClassifier = "migration"
mainClass = "com.project.authmigration.MigrationApplication"
classpath = sourceSets.main.runtimeClasspath
targetJavaVersion = JavaVersion.VERSION_21
}
@@ -0,0 +1,55 @@
{
"groups": [
{
"name": "app.docs",
"type": "com.project.auth.config.openapi.AppDocsProperties",
"sourceType": "com.project.auth.config.openapi.AppDocsProperties"
},
{
"name": "app.logging.access",
"type": "com.project.auth.config.web.AccessLogProperties",
"sourceType": "com.project.auth.config.web.AccessLogProperties"
},
{
"name": "app.persistence.migration",
"type": "com.project.auth.config.persistence.MigrationProperties",
"sourceType": "com.project.auth.config.persistence.MigrationProperties"
}
],
"properties": [
{
"name": "app.docs.description",
"type": "java.lang.String",
"sourceType": "com.project.auth.config.openapi.AppDocsProperties"
},
{
"name": "app.docs.title",
"type": "java.lang.String",
"sourceType": "com.project.auth.config.openapi.AppDocsProperties"
},
{
"name": "app.docs.version",
"type": "java.lang.String",
"sourceType": "com.project.auth.config.openapi.AppDocsProperties"
},
{
"name": "app.logging.access.excluded-path-prefixes",
"type": "java.util.List<java.lang.String>",
"sourceType": "com.project.auth.config.web.AccessLogProperties"
},
{
"name": "app.persistence.migration.location",
"type": "java.lang.String",
"sourceType": "com.project.auth.config.persistence.MigrationProperties"
},
{
"name": "app.persistence.migration.schema",
"type": "java.lang.String",
"sourceType": "com.project.auth.config.persistence.MigrationProperties"
}
],
"hints": [],
"ignored": {
"properties": []
}
}

Some files were not shown because too many files have changed in this diff Show More