chore: 팀 워크플로우 초기화 및 CLAUDE.md 프로젝트 특화 (#2)
This commit is contained in:
부모
f6683b269e
커밋
75478266a6
@ -26,7 +26,9 @@
|
|||||||
"Bash(git show *)",
|
"Bash(git show *)",
|
||||||
"Bash(git tag *)",
|
"Bash(git tag *)",
|
||||||
"Bash(curl -s *)",
|
"Bash(curl -s *)",
|
||||||
"Bash(sdk *)"
|
"Bash(sdk *)",
|
||||||
|
"Bash(chmod +x *)",
|
||||||
|
"Bash(bash .claude/scripts/*)"
|
||||||
],
|
],
|
||||||
"deny": [
|
"deny": [
|
||||||
"Bash(git push --force*)",
|
"Bash(git push --force*)",
|
||||||
@ -46,5 +48,42 @@
|
|||||||
"Read(./**/application-local.yml)",
|
"Read(./**/application-local.yml)",
|
||||||
"Read(./**/application-local.properties)"
|
"Read(./**/application-local.properties)"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"hooks": {
|
||||||
|
"SessionStart": [
|
||||||
|
{
|
||||||
|
"matcher": "compact",
|
||||||
|
"hooks": [
|
||||||
|
{
|
||||||
|
"type": "command",
|
||||||
|
"command": "bash .claude/scripts/on-post-compact.sh",
|
||||||
|
"timeout": 10
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"PreCompact": [
|
||||||
|
{
|
||||||
|
"hooks": [
|
||||||
|
{
|
||||||
|
"type": "command",
|
||||||
|
"command": "bash .claude/scripts/on-pre-compact.sh",
|
||||||
|
"timeout": 30
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"PostToolUse": [
|
||||||
|
{
|
||||||
|
"matcher": "Bash",
|
||||||
|
"hooks": [
|
||||||
|
{
|
||||||
|
"type": "command",
|
||||||
|
"command": "bash .claude/scripts/on-commit.sh",
|
||||||
|
"timeout": 15
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
6
.claude/workflow-version.json
Normal file
6
.claude/workflow-version.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"applied_global_version": "1.6.1",
|
||||||
|
"applied_date": "2026-03-23",
|
||||||
|
"project_type": "java-maven",
|
||||||
|
"gitea_url": "https://gitea.gc-si.dev"
|
||||||
|
}
|
||||||
0
.githooks/commit-msg
Normal file → Executable file
0
.githooks/commit-msg
Normal file → Executable file
0
.githooks/post-checkout
Normal file → Executable file
0
.githooks/post-checkout
Normal file → Executable file
0
.githooks/pre-commit
Normal file → Executable file
0
.githooks/pre-commit
Normal file → Executable file
73
CLAUDE.md
73
CLAUDE.md
@ -1,17 +1,21 @@
|
|||||||
# 프로젝트 개요
|
# 프로젝트 개요
|
||||||
|
|
||||||
- **타입**: Java + Spring Boot + Maven
|
- **프로젝트명**: SNP Sync Batch
|
||||||
- **JDK**: 17 (`.sdkmanrc` 참조)
|
- **타입**: Java + Spring Boot + Spring Batch + Maven
|
||||||
- **프레임워크**: Spring Boot
|
- **설명**: S&P Global 해양 데이터를 API로 수집하여 PostgreSQL에 동기화하는 배치 시스템 (Web GUI 포함)
|
||||||
|
- **JDK**: 17 (`.sdkmanrc` 참조, 17.0.18-amzn)
|
||||||
|
- **프레임워크**: Spring Boot 3.2.1, Spring Batch 5.1.0, Quartz 2.5.0
|
||||||
- **빌드 도구**: Maven (Maven Wrapper 사용)
|
- **빌드 도구**: Maven (Maven Wrapper 사용)
|
||||||
|
- **DB**: PostgreSQL (dual datasource: batch-meta + business)
|
||||||
|
- **프론트엔드**: React (frontend-maven-plugin으로 빌드 통합)
|
||||||
|
|
||||||
## 빌드 및 실행
|
## 빌드 및 실행
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# 빌드
|
# 빌드 (백엔드만)
|
||||||
./mvnw clean compile
|
./mvnw clean compile -DskipTests
|
||||||
|
|
||||||
# 패키징
|
# 전체 패키징 (프론트엔드 포함)
|
||||||
./mvnw clean package -DskipTests
|
./mvnw clean package -DskipTests
|
||||||
|
|
||||||
# 테스트
|
# 테스트
|
||||||
@ -20,7 +24,7 @@
|
|||||||
# 특정 테스트 클래스 실행
|
# 특정 테스트 클래스 실행
|
||||||
./mvnw test -Dtest=클래스명
|
./mvnw test -Dtest=클래스명
|
||||||
|
|
||||||
# 로컬 실행
|
# 로컬 실행 (포트 8051, context-path: /snp-sync)
|
||||||
./mvnw spring-boot:run
|
./mvnw spring-boot:run
|
||||||
|
|
||||||
# 린트 (Checkstyle 설정된 경우)
|
# 린트 (Checkstyle 설정된 경우)
|
||||||
@ -33,21 +37,48 @@
|
|||||||
src/
|
src/
|
||||||
├── main/
|
├── main/
|
||||||
│ ├── java/
|
│ ├── java/
|
||||||
│ │ └── com/gcsc/{프로젝트}/
|
│ │ └── com/snp/batch/
|
||||||
│ │ ├── config/ # 설정 클래스
|
│ │ ├── SnpBatchApplication.java # 메인 클래스
|
||||||
│ │ ├── controller/ # REST 컨트롤러
|
│ │ ├── common/
|
||||||
│ │ ├── service/ # 비즈니스 로직
|
│ │ │ ├── batch/ # 배치 공통 (Base 클래스들)
|
||||||
│ │ ├── repository/ # 데이터 접근
|
│ │ │ │ ├── config/ # BaseJobConfig
|
||||||
│ │ ├── domain/ # 엔티티
|
│ │ │ │ ├── entity/ # BaseEntity
|
||||||
│ │ ├── dto/ # 데이터 전송 객체
|
│ │ │ │ ├── processor/ # BaseProcessor
|
||||||
│ │ ├── exception/ # 예외 처리
|
│ │ │ │ ├── reader/ # BaseApiReader
|
||||||
│ │ └── util/ # 유틸리티
|
│ │ │ │ ├── repository/ # BaseJdbcRepository
|
||||||
|
│ │ │ │ └── writer/ # BaseWriter, BaseChunkedWriter
|
||||||
|
│ │ │ ├── util/ # 유틸리티 (EntityUtils, CommonSql 등)
|
||||||
|
│ │ │ └── web/ # 웹 공통 (BaseController, BaseService)
|
||||||
|
│ │ ├── jobs/datasync/batch/ # 동기화 배치 Job 모듈
|
||||||
|
│ │ │ ├── code/ # 코드 동기화 (Stat5Code, FlagCode)
|
||||||
|
│ │ │ ├── compliance/ # 컴플라이언스 동기화
|
||||||
|
│ │ │ ├── facility/ # 시설/항구 동기화
|
||||||
|
│ │ │ ├── movement/ # 선박 이동 동기화
|
||||||
|
│ │ │ ├── psc/ # PSC 검사 동기화
|
||||||
|
│ │ │ └── ... # ship, event, risk 등
|
||||||
|
│ │ └── scheduler/ # Quartz 스케줄러
|
||||||
│ └── resources/
|
│ └── resources/
|
||||||
│ ├── application.yml # 공통 설정
|
│ ├── application.yml # 공통 설정
|
||||||
│ ├── application-local.yml # 로컬 설정 (.gitignore)
|
│ ├── application-dev.yml # 개발 설정
|
||||||
│ └── application-prod.yml # 운영 설정
|
│ ├── application-prod.yml # 운영 설정
|
||||||
└── test/
|
│ └── application-local.yml # 로컬 설정 (.gitignore)
|
||||||
└── java/ # 테스트 코드
|
├── test/
|
||||||
|
│ └── java/ # 테스트 코드
|
||||||
|
└── frontend/ # React 프론트엔드
|
||||||
|
```
|
||||||
|
|
||||||
|
## 배치 Job 구조 패턴
|
||||||
|
|
||||||
|
각 도메인 모듈은 동일한 구조를 따름:
|
||||||
|
```
|
||||||
|
jobs/datasync/batch/{도메인}/
|
||||||
|
├── config/ # JobConfig (Step, Job 정의)
|
||||||
|
├── dto/ # API 응답 DTO
|
||||||
|
├── entity/ # DB Entity
|
||||||
|
├── reader/ # ItemReader (API 호출)
|
||||||
|
├── processor/ # ItemProcessor (DTO → Entity 변환)
|
||||||
|
├── repository/ # JdbcRepository (SQL 직접 사용)
|
||||||
|
└── writer/ # ItemWriter (DB 저장)
|
||||||
```
|
```
|
||||||
|
|
||||||
## 팀 규칙
|
## 팀 규칙
|
||||||
|
|||||||
24
frontend/.gitignore
vendored
Normal file
24
frontend/.gitignore
vendored
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
# Logs
|
||||||
|
logs
|
||||||
|
*.log
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
pnpm-debug.log*
|
||||||
|
lerna-debug.log*
|
||||||
|
|
||||||
|
node_modules
|
||||||
|
dist
|
||||||
|
dist-ssr
|
||||||
|
*.local
|
||||||
|
|
||||||
|
# Editor directories and files
|
||||||
|
.vscode/*
|
||||||
|
!.vscode/extensions.json
|
||||||
|
.idea
|
||||||
|
.DS_Store
|
||||||
|
*.suo
|
||||||
|
*.ntvs*
|
||||||
|
*.njsproj
|
||||||
|
*.sln
|
||||||
|
*.sw?
|
||||||
불러오는 중...
Reference in New Issue
Block a user