-
Notifications
You must be signed in to change notification settings - Fork 0
20260102 #1 프로젝트 멀티모듈 구조 도입 #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The head ref may contain hidden characters: "20260102_#1_\uD504\uB85C\uC81D\uD2B8_\uBA40\uD2F0\uBAA8\uB4C8_\uAD6C\uC870_\uB3C4\uC785"
Changes from all commits
67eafa0
0a57603
896f8b2
414531d
7499f89
61da421
b521d03
d1c1ba8
efdffd2
f4652fd
d1aff91
f51eb04
fa62857
8edefd3
6760122
5f39fec
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json | ||
| language: "ko-KR" | ||
| ignored_branch: "" | ||
| early_access: false | ||
| reviews: | ||
| profile: "chill" | ||
| request_changes_workflow: false | ||
| high_level_summary: true | ||
| poem: true | ||
| review_status: true | ||
| collapse_walkthrough: false | ||
| auto_review: | ||
| enabled: true | ||
| drafts: false | ||
| base_branches: | ||
| - test | ||
| chat: | ||
| auto_reply: true |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| plugins { | ||
| id("java-library") | ||
| } | ||
|
|
||
| tasks.bootJar { | ||
| enabled = false | ||
| } | ||
|
|
||
| tasks.jar { | ||
| enabled = true | ||
| archiveClassifier.set("") | ||
| } | ||
|
|
||
| dependencies { | ||
| implementation(project(":CT-common")) | ||
|
|
||
| api(libs.spring.boot.starter.security) | ||
| api(libs.spring.security.test) | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| plugins { | ||
| id("java-library") | ||
| } | ||
|
|
||
| tasks.bootJar { | ||
| enabled = false | ||
| } | ||
|
|
||
| tasks.jar { | ||
| enabled = true | ||
| archiveClassifier.set("") | ||
| } | ||
|
|
||
| // common 모듈 api 의존성은 모든 모듈에 적용 | ||
| dependencies { | ||
| // Spring Starter Web | ||
| api(libs.spring.boot.starter.web) | ||
|
|
||
| // JPA | ||
| api(libs.spring.boot.starter.data.jpa) | ||
|
|
||
| // Validation | ||
| api(libs.spring.boot.starter.validation) | ||
|
|
||
| // Jackson | ||
| api(libs.jackson.module.kotlin) | ||
|
|
||
| api(libs.kotlin.reflect) | ||
| api(libs.kotlin.stdlib) | ||
| } | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| package com.chuseok22.ctcommon.core.util | ||
|
|
||
| /** | ||
| * null 또는 빈 문자열을 기본값으로 대체 | ||
| */ | ||
| fun String?.nvl(fallback: String): String { | ||
| return when { | ||
| this == null -> fallback | ||
| this == "null" -> fallback | ||
| this.isBlank() -> fallback | ||
| else -> this | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| plugins { | ||
| id("java-library") | ||
| } | ||
|
|
||
| tasks.bootJar { | ||
| enabled = false | ||
| } | ||
|
|
||
| tasks.jar { | ||
| enabled = true | ||
| archiveClassifier.set("") | ||
| } | ||
|
|
||
| dependencies { | ||
| implementation(project(":CT-common")) | ||
|
|
||
| // Postgres | ||
| api(libs.postgresql) | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| plugins { | ||
| id("java-library") | ||
| id("org.springframework.boot") | ||
| } | ||
|
|
||
| dependencies { | ||
| implementation(project(":CT-auth")) | ||
| implementation(project(":CT-common")) | ||
| implementation(project(":CT-member")) | ||
|
|
||
| implementation(libs.swagger.ui) | ||
| implementation(libs.http.logging) | ||
| implementation(libs.api.change.log) | ||
| } | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| package com.chuseok22.ctweb.infrastructure.config | ||
|
|
||
| import org.springframework.context.annotation.ComponentScan | ||
| import org.springframework.context.annotation.Configuration | ||
|
|
||
| @Configuration | ||
| @ComponentScan(basePackages = [ | ||
| "com.chuseok22.*" | ||
| ]) | ||
| class ComponentScanConfig { | ||
| } | ||
Chuseok22 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| package com.chuseok22.ctweb.infrastructure.config | ||
|
|
||
| import org.springframework.boot.autoconfigure.domain.EntityScan | ||
| import org.springframework.context.annotation.Configuration | ||
| import org.springframework.data.jpa.repository.config.EnableJpaRepositories | ||
|
|
||
| @Configuration | ||
| @EntityScan(basePackages = ["com.chuseok22.*"]) | ||
| @EnableJpaRepositories(basePackages = ["com.chuseok22.*"]) | ||
| class DatabaseScanConfig { | ||
| } | ||
Chuseok22 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| package com.chuseok22.ctweb.infrastructure.config | ||
|
|
||
| import com.chuseok22.ctweb.infrastructure.properties.SpringDocProperties | ||
| import io.swagger.v3.oas.annotations.OpenAPIDefinition | ||
| import io.swagger.v3.oas.annotations.info.Info | ||
| import io.swagger.v3.oas.models.Components | ||
| import io.swagger.v3.oas.models.OpenAPI | ||
| import io.swagger.v3.oas.models.security.SecurityRequirement | ||
| import io.swagger.v3.oas.models.security.SecurityScheme | ||
| import io.swagger.v3.oas.models.servers.Server | ||
| import org.springdoc.core.customizers.OpenApiCustomizer | ||
| import org.springframework.boot.context.properties.EnableConfigurationProperties | ||
| import org.springframework.context.annotation.Bean | ||
| import org.springframework.context.annotation.Configuration | ||
|
|
||
| @OpenAPIDefinition( | ||
| info = Info( | ||
| title = "캠퍼스 테이블 CampusTable" | ||
| ) | ||
| ) | ||
| @Configuration | ||
| @EnableConfigurationProperties(SpringDocProperties::class) | ||
| class SwaggerConfig( | ||
| private val properties: SpringDocProperties | ||
| ) { | ||
|
|
||
| @Bean | ||
| fun OpenAPI(): OpenAPI { | ||
| val apiKey: SecurityScheme = SecurityScheme() | ||
| .type(SecurityScheme.Type.HTTP) | ||
| .scheme("bearer") | ||
| .bearerFormat("JWT") | ||
| .`in`(SecurityScheme.In.HEADER) | ||
| .name("Authorization") | ||
|
|
||
| return OpenAPI() | ||
| .components(Components().addSecuritySchemes("Bearer Token", apiKey)) | ||
| .addSecurityItem(SecurityRequirement().addList("Bearer Token")) | ||
| } | ||
|
|
||
| @Bean | ||
| fun serverCustomizer(): OpenApiCustomizer { | ||
| return OpenApiCustomizer { openApi -> | ||
| properties.servers.forEach { server -> | ||
| openApi.addServersItem( | ||
| Server() | ||
| .url(server.url) | ||
| .description(server.description) | ||
| ) | ||
| } | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| package com.chuseok22.ctweb.infrastructure.properties | ||
|
|
||
| import jakarta.validation.Valid | ||
| import jakarta.validation.constraints.NotBlank | ||
| import org.springframework.boot.context.properties.ConfigurationProperties | ||
| import org.springframework.validation.annotation.Validated | ||
|
|
||
| @Validated | ||
| @ConfigurationProperties(prefix = "springdoc") | ||
| data class SpringDocProperties( | ||
| @field:Valid | ||
| val servers: List<Servers> | ||
| ) { | ||
| data class Servers( | ||
| @field:NotBlank | ||
| val url: String, | ||
| @field:NotBlank | ||
| val description: String | ||
| ) | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| spring: | ||
| profiles: | ||
| active: prod | ||
|
Comment on lines
+2
to
+3
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hardcoded production profile breaks local development. Setting Instead, use environment-specific configuration files ( 🔎 Recommended approachRemove the hardcoded profile and rely on environment-based activation: spring:
- profiles:
- active: prod
config:
import: classpath:config-imports.ymlThen set the profile via environment variable in your deployment:
🤖 Prompt for AI Agents |
||
| config: | ||
| import: classpath:config-imports.yml | ||
| jpa: | ||
| open-in-view: false | ||
| properties: | ||
| hibernate: | ||
| jdbc: | ||
| time_zone: UTC | ||
| dialect: org.hibernate.dialect.PostgreSQLDialect | ||
| show_sql: false | ||
| format_sql: true | ||
| use_sql_comments: true | ||
| flyway: | ||
| enabled: true | ||
| locations: classpath:db/migration | ||
| baseline-on-migrate: false | ||
| validate-on-migrate: true | ||
| out-of-order: false # 과거 버전이 뒤늦게 들어오는 경우 방지 | ||
| clean-disabled: true # 실수로 clean 되는 경우 방지 | ||
| jackson: | ||
| time-zone: Asia/Seoul | ||
| servlet: | ||
| multipart: | ||
| enabled: true # 파일 업로드 허용 | ||
| max-file-size: 200MB # 업로드 파일 최대 크기 | ||
| max-request-size: 1000MB # 요청 전체 최대 크기 | ||
| file-size-threshold: 10MB | ||
|
Comment on lines
+25
to
+30
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: git ls-files | head -30Repository: CampusTable/campus-table-server Length of output: 886 🏁 Script executed: find . -maxdepth 3 -type f -name "*.md" -o -name "README*" | head -20Repository: CampusTable/campus-table-server Length of output: 668 🏁 Script executed: rg -l "upload|file.*size" --type java --max-count 20Repository: CampusTable/campus-table-server Length of output: 57 🏁 Script executed: find . -name "README*" -type f | grep -v node_modulesRepository: CampusTable/campus-table-server Length of output: 102 🏁 Script executed: rg -l "upload|multipart" --type java -g "*.java" | head -20Repository: CampusTable/campus-table-server Length of output: 223 🏁 Script executed: cat CT-web/src/main/resources/application.yml | head -40Repository: CampusTable/campus-table-server Length of output: 837 🏁 Script executed: find . -maxdepth 2 -name "*.md" -type f | grep -i readmeRepository: CampusTable/campus-table-server Length of output: 57 🏁 Script executed: find CT-web/src/main/java -type f -name "*.java" | xargs rg -l "upload|multipart" 2>/dev/null | head -20Repository: CampusTable/campus-table-server Length of output: 189 🏁 Script executed: find . -type f -name "*.java" | xargs rg -l "MultipartFile|@PostMapping.*upload" 2>/dev/null | head -20Repository: CampusTable/campus-table-server Length of output: 57 🏁 Script executed: ls -la CT-web/src/main/Repository: CampusTable/campus-table-server Length of output: 292 🏁 Script executed: find . -type f -name "*.java" | head -30Repository: CampusTable/campus-table-server Length of output: 57 🏁 Script executed: cat ./README.md 2>/dev/null || find . -maxdepth 3 -iname "*readme*" -type f | head -5Repository: CampusTable/campus-table-server Length of output: 102 🏁 Script executed: find CT-web/src/main/kotlin -type f -name "*.kt" | xargs rg -l "upload|multipart|MultipartFile" 2>/dev/null | head -20Repository: CampusTable/campus-table-server Length of output: 57 🏁 Script executed: find CT-web/src/main/kotlin -type f -name "*.kt" | xargs rg -l "PostMapping|RequestBody" 2>/dev/null | head -20Repository: CampusTable/campus-table-server Length of output: 57 🏁 Script executed: cat .cursor/scripts/README.md | head -50Repository: CampusTable/campus-table-server Length of output: 1481 🏁 Script executed: find CT-web/src/main/kotlin -type f -name "*.kt" | head -30Repository: CampusTable/campus-table-server Length of output: 323 🏁 Script executed: find CT-web/src/main/kotlin -type f -name "*.kt" | xargs rg "@RestController|@Controller|class.*Controller" | head -30Repository: CampusTable/campus-table-server Length of output: 57 🏁 Script executed: rg -i "file.*upload|upload.*file|200.*MB|1000.*MB" --type kotlinRepository: CampusTable/campus-table-server Length of output: 57 🏁 Script executed: cat CT-web/src/main/kotlin/com/chuseok22/ctweb/CampusTableServerApplication.ktRepository: CampusTable/campus-table-server Length of output: 366 🏁 Script executed: find . -type f \( -name "*.java" -o -name "*.kt" -o -name "*.groovy" \) | wc -lRepository: CampusTable/campus-table-server Length of output: 76 🏁 Script executed: rg -i "multipart|upload.*file|file.*upload" --type-list | head -5 && rg -i "multipart\|upload" . --max-count 20 2>/dev/nullRepository: CampusTable/campus-table-server Length of output: 464 🏁 Script executed: rg -i "multipart\|upload\|file.*size" . --max-count 30Repository: CampusTable/campus-table-server Length of output: 57 🏁 Script executed: cat CT-web/src/main/kotlin/com/chuseok22/ctweb/infrastructure/config/SwaggerConfig.ktRepository: CampusTable/campus-table-server Length of output: 1726 🏁 Script executed: git log --oneline CT-web/src/main/resources/application.yml | head -10Repository: CampusTable/campus-table-server Length of output: 184 🏁 Script executed: find . -maxdepth 3 -name "pom.xml" -o -name "build.gradle.kts"Repository: CampusTable/campus-table-server Length of output: 204 🏁 Script executed: ls -la CT-web/Repository: CampusTable/campus-table-server Length of output: 304 🏁 Script executed: git log --all --oneline | head -20Repository: CampusTable/campus-table-server Length of output: 279 🏁 Script executed: find . -type f -name "*.kt" | xargs rg "@RestController|@PostMapping|@RequestMapping|fun.*upload" 2>/dev/null | head -30Repository: CampusTable/campus-table-server Length of output: 57 🏁 Script executed: git log --all --pretty=format:"%h %s" | grep -i "upload\|file"Repository: CampusTable/campus-table-server Length of output: 57 🏁 Script executed: cat CT-web/build.gradle.ktsRepository: CampusTable/campus-table-server Length of output: 376 🏁 Script executed: find . -type f -name "*.kt" -path "*/src/main/*" | xargs grep -l "upload\|MultipartFile\|file.*size" 2>/dev/nullRepository: CampusTable/campus-table-server Length of output: 59 🏁 Script executed: find . -type f -name "*.kt" -path "*/src/main/*" | xargs wc -l | tail -1Repository: CampusTable/campus-table-server Length of output: 85 🏁 Script executed: cat CT-common/build.gradle.ktsRepository: CampusTable/campus-table-server Length of output: 528 🏁 Script executed: find . -type f -name "*.kt" -o -name "*.md" -o -name "*.txt" | xargs grep -l "upload\|파일" 2>/dev/null | head -20Repository: CampusTable/campus-table-server Length of output: 672 🏁 Script executed: find . -maxdepth 3 -name "*.md" -type f | xargs cat 2>/dev/nullRepository: CampusTable/campus-table-server Length of output: 50390 🏁 Script executed: rg "max.*file\|max.*request" -A 2 -B 2 CT-web/src/main/resources/Repository: CampusTable/campus-table-server Length of output: 57 Remove or reduce multipart configuration — currently unused and poses unnecessary security risk if ever activated. The multipart configuration in Recommendation:
🤖 Prompt for AI Agents |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test dependency incorrectly declared as
apiscope.spring-security-testis a testing library but is declared withapiscope (line 18). This:Test dependencies should use
testImplementationscope.🔎 Required fix
If CT-web or other modules also need Spring Security Test, they should declare it explicitly in their own
dependenciesblock rather than inheriting it from CT-auth.📝 Committable suggestion
🤖 Prompt for AI Agents