pnu-update 스케줄 추가

This commit is contained in:
2026-02-03 10:30:47 +09:00
parent fa0bec8747
commit 48882c9123
183 changed files with 9650 additions and 0 deletions

View File

View File

@@ -0,0 +1,2 @@
#Mon Feb 02 19:50:45 KST 2026
gradle.version=8.14

Binary file not shown.

View File

@@ -0,0 +1,112 @@
# Code Style 설정 가이드
이 문서는 프로젝트에서 Google Java Style을 자동으로 적용하기 위한 설정 가이드입니다.
## 자동 포맷팅 구성
### 1. 커밋 시점 자동 포맷팅 (Git Pre-commit Hook)
커밋 전에 자동으로 코드를 포맷팅하고 스테이징합니다.
**설정 완료:** `.git/hooks/pre-commit` 파일이 자동으로 실행됩니다.
**동작 방식:**
- 커밋 시도 시 `./gradlew spotlessApply` 자동 실행
- 스테이징된 Java 파일을 자동으로 포맷팅
- 포맷팅된 파일을 자동으로 다시 스테이징
- 포맷팅이 완료되면 커밋 진행
**장점:**
- 수동으로 `spotlessApply`를 실행할 필요 없음
- 항상 일관된 코드 스타일 유지
- 포맷팅 누락 방지
### 2. IntelliJ IDEA 저장 시점 자동 포맷팅
#### 방법 1: Code Style 설정 임포트 (권장)
1. **IntelliJ IDEA 열기**
2. **Settings/Preferences** (Mac: `⌘,` / Windows: `Ctrl+Alt+S`)
3. **Editor > Code Style > Java**
4. **⚙️ (톱니바퀴)** 클릭 > **Import Scheme > IntelliJ IDEA code style XML**
5. 프로젝트 루트의 `intellij-java-google-style.xml` 파일 선택
6. **OK** 클릭
#### 방법 2: 저장 시 자동 포맷팅 활성화
**Option A: Actions on Save 설정**
1. **Settings/Preferences** > **Tools > Actions on Save**
2. 다음 옵션들을 활성화:
-**Reformat code**
-**Optimize imports**
-**Rearrange code** (선택사항)
3. **Changed lines** 또는 **Whole file** 선택
4. **OK** 클릭
**Option B: Save Actions Plugin 사용 (더 많은 옵션)**
1. **Settings/Preferences** > **Plugins**
2. **Marketplace**에서 "Save Actions" 검색 및 설치
3. **Settings/Preferences** > **Other Settings > Save Actions**
4. 다음 옵션 활성화:
-**Activate save actions on save**
-**Reformat file**
-**Optimize imports**
-**Rearrange fields and methods** (선택사항)
### 3. Gradle Spotless Plugin 수동 실행
#### 코드 포맷팅 체크
```bash
# 포맷팅 문제 확인만 (수정하지 않음)
./gradlew spotlessCheck
```
#### 코드 자동 포맷팅
```bash
# 모든 Java 파일 자동 포맷팅 적용
./gradlew spotlessApply
```
#### 빌드 시 자동 체크
```bash
# 빌드 전에 자동으로 spotlessCheck 실행됨
./gradlew build
```
## 코드 스타일 규칙
프로젝트는 **Google Java Style Guide** 기반으로 다음 규칙을 따릅니다:
- **Indentation**: 2 spaces (탭 아님)
- **Line Length**: 180 characters
- **Line Endings**: LF (Unix-style)
- **Charset**: UTF-8
- **Import Order**: Static imports → 빈 줄 → Regular imports
- **Braces**: 모든 if, for, while, do 문에 중괄호 필수
## 문제 해결
### Pre-commit hook이 실행되지 않는 경우
```bash
# 실행 권한 확인 및 부여
chmod +x .git/hooks/pre-commit
```
### Spotless 플러그인이 동작하지 않는 경우
```bash
# Gradle 의존성 다시 다운로드
./gradlew clean build --refresh-dependencies
```
### IntelliJ 포맷팅이 다르게 적용되는 경우
1. `intellij-java-google-style.xml` 다시 임포트
2. **File > Invalidate Caches** > **Invalidate and Restart**
## 추가 정보
- **Google Java Style Guide**: https://google.github.io/styleguide/javaguide.html
- **Spotless Plugin**: https://github.com/diffplug/spotless
- **IntelliJ Code Style**: https://www.jetbrains.com/help/idea/code-style.html

View File

@@ -0,0 +1,282 @@
# 공통코드 Redis 캐시 시스템 - DanielLee
## 요구사항 검토
### 1. **API를 통해 공통코드 제공**
- **구현 완료**: `CommonCodeApiController`에서 전체 공통코드 조회 API 제공
```
GET /api/code
→ 모든 공통코드 조회
```
- **추가 구현**: 캐시 갱신 및 상태 확인 API
```
POST /api/code/cache/refresh → 캐시 갱신
GET /api/code/cache/status → 캐시 상태 확인
```
---
### 2. **애플리케이션 로딩시 Redis 캐시에 올리기**
- **구현 완료**: `CommonCodeCacheManager` 클래스 생성
#### 초기화 메커니즘
```java
@Component
@RequiredArgsConstructor
public class CommonCodeCacheManager {
@EventListener(ApplicationReadyEvent.class)
public void initializeCommonCodeCache() {
// 애플리케이션 완전히 시작된 후 공통코드를 Redis에 미리 로드
List<Basic> allCommonCodes = commonCodeService.getFindAll();
// @Cacheable이 자동으로 Redis에 캐시함
}
}
```
#### 동작 흐름
1. 애플리케이션 시작
2. Spring이 모든 Bean 생성 완료 (`ApplicationReadyEvent` 발생)
3. `CommonCodeCacheManager.initializeCommonCodeCache()` 실행
4. `commonCodeService.getFindAll()` 호출 (DB에서 조회)
5. `@Cacheable(value = "commonCodes")` 에노테이션이 결과를 Redis에 저장
---
### 3. **공통코드 변경시 데이터 갱신**
#### 자동 갱신
- **등록 (CREATE)**: `@CacheEvict` → 캐시 전체 삭제
- **수정 (UPDATE)**: `@CacheEvict` → 캐시 전체 삭제
- **삭제 (DELETE)**: `@CacheEvict` → 캐시 전체 삭제
- **순서 변경**: `@CacheEvict` → 캐시 전체 삭제
```java
@CacheEvict(value = "commonCodes", allEntries = true)
public ResponseObj save(CommonCodeDto.AddReq req) {
// 공통코드 저장
// ↓
// 캐시 전체 삭제 (다음 조회 시 DB에서 새로 로드)
}
```
#### 수동 갱신 (관리자)
```java
POST /api/code/cache/refresh
```
- 공통코드 설정이 변경된 후 API를 호출하여 캐시를 강제 갱신
#### 캐시 상태 모니터링
```java
GET /api/code/cache/status
→ 응답: { "data": 150 } // 캐시된 공통코드 150개
```
---
## 전체 아키텍처
```
┌─────────────────────────────────────────────────────────┐
│ 클라이언트 요청 │
└──────────────────┬──────────────────────────────────────┘
┌──────────▼──────────┐
│ CommonCodeApiController
└──────────┬──────────┘
┌─────────┴──────────┐
│ │
┌────▼─────┐ ┌──────▼────────────┐
│ 조회 API │ │ 캐시 관리 API │
│ (GET) │ │(POST, GET) │
└────┬─────┘ └──────┬────────────┘
│ │
│ ┌────────▼──────────┐
│ │CommonCodeCacheManager
│ │(캐시 초기화/갱신) │
│ └────────┬──────────┘
│ │
┌────▼─────────────────┬─▼────┐
│ CommonCodeService │ │
│ (@Cacheable) │ │
│ (@CacheEvict) │ │
└────┬──────────────────┴──────┘
┌────▼──────────┐
│ Redis 캐시 │
│ (공통코드) │
└────┬──────────┘
┌────▼──────────┐
│ PostgreSQL DB │
│ (공통코드) │
└───────────────┘
```
---
## API 명세
### 1. 공통코드 조회 (캐시됨)
```
GET /api/code
응답:
{
"data": [
{
"id": 1,
"code": "STATUS",
"name": "상태",
"description": "상태 공통코드",
"used": true,
...
},
...
]
}
```
### 2. 공통코드 캐시 갱신
```
POST /api/code/cache/refresh
응답:
{
"data": "공통코드 캐시가 갱신되었습니다."
}
```
### 3. 캐시 상태 확인
```
GET /api/code/cache/status
응답:
{
"data": 150 // Redis에 캐시된 공통코드 개수
}
```
---
## 캐시 갱신 흐름
### 자동 갱신 (CRUD 작업)
```
관리자가 공통코드 등록/수정/삭제
CommonCodeService.save() / update() / removeCode()
(@CacheEvict 실행)
Redis 캐시 전체 삭제
다음 조회 시 DB에서 새로 로드
```
### 수동 갱신 (API 호출)
```
관리자: POST /api/code/cache/refresh
CommonCodeCacheManager.refreshCommonCodeCache()
캐시 정리 + 새로운 데이터 로드
Redis 캐시 업데이트 완료
```
---
## 성능 최적화 효과
| 항목 | 개선 전 | 개선 후 |
|------|--------|--------|
| **조회 속도** | DB 직접 조회 (10-100ms) | Redis 캐시 (1-5ms) |
| **DB 부하** | 매번 조회 | 캐시 미스시만 조회 |
| **네트워크 대역폭** | 높음 (DB 왕복) | 낮음 (로컬 캐시) |
| **응답 시간** | 변동적 | 일정 (캐시) |
---
## 추가 기능
### CommonCodeUtil - 전역 공통코드 조회
```java
@Component
public class CommonCodeUtil {
// 모든 공통코드 조회 (캐시 활용)
public List<Basic> getAllCommonCodes()
// 특정 코드로 조회
public List<Basic> getCommonCodesByCode(String code)
// ID로 단건 조회
public Optional<Basic> getCommonCodeById(Long id)
// 코드명 조회
public Optional<String> getCodeName(String parentCode, String childCode)
// 하위 코드 조회
public List<Basic> getChildCodesByParentCode(String parentCode)
// 코드 사용 가능 여부 확인
public boolean isCodeAvailable(Long parentId, String code)
}
```
### 사용 예시
```java
@RequiredArgsConstructor
@RestController
public class SomeController {
private final CommonCodeUtil commonCodeUtil;
@GetMapping("/example")
public void example() {
// 1. 모든 공통코드 조회 (캐시됨)
List<Basic> allCodes = commonCodeUtil.getAllCommonCodes();
// 2. 특정 코드 조회
Optional<String> name = commonCodeUtil.getCodeName("PARENT", "CHILD");
// 3. 코드 사용 가능 여부 확인
boolean available = commonCodeUtil.isCodeAvailable(1L, "NEW_CODE");
}
}
```
---
## 완료 체크리스트
- Redis 캐싱 어노테이션 적용 (@Cacheable, @CacheEvict)
- 애플리케이션 로딩시 캐시 초기화
- CRUD 작업시 자동 캐시 갱신
- 수동 캐시 갱신 API 제공
- 캐시 상태 모니터링 API
- 전역 공통코드 조회 유틸리티
- 포괄적인 유닛 테스트 (12개)
---
## 모니터링
캐시 상태를 주기적으로 모니터링:
```bash
# 캐시 상태 확인
curl http://localhost:8080/api/code/cache/status
# 캐시 갱신
curl -X POST http://localhost:8080/api/code/cache/refresh
```
로그 확인:
```
=== 공통코드 캐시 초기화 시작 ===
✓ 공통코드 150개가 Redis 캐시에 로드되었습니다.
- [STATUS] 상태 (ID: 1)
- [TYPE] 타입 (ID: 2)
...
=== 공통코드 캐시 초기화 완료 ===
```

View File

@@ -0,0 +1,29 @@
# Stage 1: Build stage (gradle build는 Jenkins에서 이미 수행)
FROM eclipse-temurin:21-jre-jammy
# GDAL 설치
RUN apt-get update && apt-get install -y \
gdal-bin \
libgdal-dev \
&& rm -rf /var/lib/apt/lists/*
ARG UID=1000
ARG GID=1000
RUN groupadd -g ${GID} manager01 \
&& useradd -u ${UID} -g ${GID} -m manager01
USER manager01
# 작업 디렉토리 설정
WORKDIR /app
# JAR 파일 복사 (Jenkins에서 빌드된 ROOT.jar)
COPY build/libs/ROOT.jar app.jar
# 포트 노출
EXPOSE 8080
# 애플리케이션 실행
# dev 프로파일로 실행
ENTRYPOINT ["java", "-jar", "-Dspring.profiles.active=dev", "app.jar"]

View File

@@ -0,0 +1,94 @@
pipeline {
agent any
tools {
jdk 'jdk21'
}
environment {
BRANCH = 'develop'
GIT_REPO = 'https://10.100.0.10:3210/dabeeo/kamco-dabeeo-backoffice.git'
}
stages {
stage('Checkout') {
steps {
checkout([
$class: 'GitSCM',
branches: [[name: "${env.BRANCH}"]],
userRemoteConfigs: [[
url: "${env.GIT_REPO}",
credentialsId: 'jenkins-dev-token'
]]
])
}
}
stage('Get Commit Hash') {
steps {
script {
env.COMMIT_HASH = sh(script: "git rev-parse --short HEAD", returnStdout: true).trim()
echo "Current commit hash: ${env.COMMIT_HASH}"
}
}
}
stage('Build') {
steps {
sh "./gradlew clean build -x test"
}
}
stage('Docker Build & Deploy') {
steps {
script {
echo "Building Docker image with tag: ${env.COMMIT_HASH}"
// IMAGE_TAG 환경변수 설정 후 docker-compose로 빌드 및 배포
sh """
export IMAGE_TAG=${env.COMMIT_HASH}
# 기존 컨테이너 중지 및 제거
docker-compose -f docker-compose-dev.yml down || true
# 새 이미지 빌드
docker-compose -f docker-compose-dev.yml build
# latest 태그도 추가
docker tag kamco-changedetection-api:${env.COMMIT_HASH} kamco-changedetection-api:latest
# 컨테이너 시작
docker-compose -f docker-compose-dev.yml up -d
"""
// 헬스체크 대기
echo "Waiting for application to be ready..."
sh """
for i in {1..30}; do
if docker exec kamco-changedetection-api curl -f http://localhost:8080/monitor/health > /dev/null 2>&1; then
echo "✅ Application is healthy!"
docker-compose -f docker-compose-dev.yml ps
exit 0
fi
echo "⏳ Waiting for application... (\$i/30)"
sleep 2
done
echo "⚠️ Warning: Health check timeout, checking container status..."
docker-compose -f docker-compose-dev.yml ps
"""
}
}
}
stage('Cleanup Old Images') {
steps {
script {
echo "Cleaning up old Docker images..."
sh """
# Keep latest 5 images, remove older ones
docker images kamco-changedetection-api --format "{{.ID}} {{.Tag}}" | \
grep -v latest | tail -n +6 | awk '{print \$1}' | xargs -r docker rmi || true
"""
}
}
}
}
}

View File

@@ -0,0 +1,26 @@
# IMAGERY MAKE DATASET
> 국유인에 연동된 객체 조회하여 pnu update schedule
## 📋 프로젝트 소개
**pnu-upadte**는 국유인에 연동된 객체를 조회하여 pnu를 업데이트 하는 schedule 입니다.
## 🚀 시작하기
GukYuinApiPnuJobService 의 findGukYuinContListPnuUpdate 메소드가 매일 01:00분에 schedule 실행됨
```bash
./gradlew spotlessApply
```
```bash
./gradlew clean build
```
```bash
Java -jar pnu-update.jar \
```
### 필수 요구사항
- Java 21 (JDK 21)
- PostgreSQL 12+ (PostGIS 확장 필요)
- Gradle 8.x (또는 Gradle Wrapper 사용)
- Docker & Docker Compose (선택사항)

View File

@@ -0,0 +1,110 @@
plugins {
id 'java'
id 'org.springframework.boot' version '3.5.7'
id 'io.spring.dependency-management' version '1.1.7'
id 'com.diffplug.spotless' version '6.25.0'
}
group = 'com.kamco.cd'
version = '0.0.1-SNAPSHOT'
description = 'review-to-down'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
bootJar {
archiveFileName = "review-to-down.jar"
}
jar {
enabled = false // plain.jar 안 만들기(혼동 방지)
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
maven { url "https://repo.osgeo.org/repository/release/" }
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'
compileOnly 'org.projectlombok:lombok'
runtimeOnly 'org.postgresql:postgresql'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
implementation 'org.springframework.boot:spring-boot-starter-validation'
//geometry
implementation 'com.fasterxml.jackson.core:jackson-databind'
implementation "org.geotools:gt-shapefile:30.0"
implementation "org.geotools:gt-referencing:30.0"
implementation "org.geotools:gt-geojson:30.0"
implementation 'org.locationtech.jts.io:jts-io-common:1.20.0'
implementation 'org.locationtech.jts:jts-core:1.19.0'
implementation 'org.hibernate:hibernate-spatial:6.2.7.Final'
implementation 'org.geotools:gt-main:30.0'
implementation("org.geotools:gt-geotiff:30.0") {
exclude group: "javax.media", module: "jai_core"
}
implementation 'org.geotools:gt-epsg-hsql:30.0'
// QueryDSL JPA
implementation 'com.querydsl:querydsl-jpa:5.0.0:jakarta'
// Q클래스 생성용 annotationProcessor
annotationProcessor 'com.querydsl:querydsl-apt:5.0.0:jakarta'
annotationProcessor 'jakarta.annotation:jakarta.annotation-api'
annotationProcessor 'jakarta.persistence:jakarta.persistence-api'
// actuator
implementation 'org.springframework.boot:spring-boot-starter-actuator'
// Redis
implementation 'org.springframework.boot:spring-boot-starter-data-redis'
// SpringDoc OpenAPI (Swagger)
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.7.0'
// Apache Commons Compress for archive handling
implementation 'org.apache.commons:commons-compress:1.26.0'
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310'
implementation 'org.reflections:reflections:0.10.2'
implementation 'org.locationtech.jts:jts-core:1.19.0'
implementation 'org.locationtech.jts.io:jts-io-common:1.19.0'
}
configurations.configureEach {
exclude group: 'javax.media', module: 'jai_core'
}
tasks.named('test') {
useJUnitPlatform()
}
// Spotless configuration for code formatting (2-space indent)
spotless {
java {
target 'src/**/*.java'
googleJavaFormat('1.19.2') // Default Google Style = 2 spaces (NO .aosp()!)
trimTrailingWhitespace()
endWithNewline()
}
}
// Run spotlessCheck before build
tasks.named('build') {
dependsOn 'spotlessCheck'
}

View File

@@ -0,0 +1,39 @@
package com.kamco.cd.kamcoback.postgres.entity;
import static com.querydsl.core.types.PathMetadataFactory.*;
import com.querydsl.core.types.dsl.*;
import com.querydsl.core.types.PathMetadata;
import javax.annotation.processing.Generated;
import com.querydsl.core.types.Path;
/**
* QCommonDateEntity is a Querydsl query type for CommonDateEntity
*/
@Generated("com.querydsl.codegen.DefaultSupertypeSerializer")
public class QCommonDateEntity extends EntityPathBase<CommonDateEntity> {
private static final long serialVersionUID = 1355779051L;
public static final QCommonDateEntity commonDateEntity = new QCommonDateEntity("commonDateEntity");
public final DateTimePath<java.time.ZonedDateTime> createdDate = createDateTime("createdDate", java.time.ZonedDateTime.class);
public final DateTimePath<java.time.ZonedDateTime> modifiedDate = createDateTime("modifiedDate", java.time.ZonedDateTime.class);
public QCommonDateEntity(String variable) {
super(CommonDateEntity.class, forVariable(variable));
}
public QCommonDateEntity(Path<? extends CommonDateEntity> path) {
super(path.getType(), path.getMetadata());
}
public QCommonDateEntity(PathMetadata metadata) {
super(CommonDateEntity.class, metadata);
}
}

View File

@@ -0,0 +1,67 @@
package com.kamco.cd.kamcoback.postgres.entity;
import static com.querydsl.core.types.PathMetadataFactory.*;
import com.querydsl.core.types.dsl.*;
import com.querydsl.core.types.PathMetadata;
import javax.annotation.processing.Generated;
import com.querydsl.core.types.Path;
/**
* QLabelingAssignmentEntity is a Querydsl query type for LabelingAssignmentEntity
*/
@Generated("com.querydsl.codegen.DefaultEntitySerializer")
public class QLabelingAssignmentEntity extends EntityPathBase<LabelingAssignmentEntity> {
private static final long serialVersionUID = -1647165171L;
public static final QLabelingAssignmentEntity labelingAssignmentEntity = new QLabelingAssignmentEntity("labelingAssignmentEntity");
public final QCommonDateEntity _super = new QCommonDateEntity(this);
public final NumberPath<Long> analUid = createNumber("analUid", Long.class);
public final StringPath assignGroupId = createString("assignGroupId");
public final ComparablePath<java.util.UUID> assignmentUid = createComparable("assignmentUid", java.util.UUID.class);
//inherited
public final DateTimePath<java.time.ZonedDateTime> createdDate = _super.createdDate;
public final NumberPath<Long> inferenceGeomUid = createNumber("inferenceGeomUid", Long.class);
public final StringPath inspectorUid = createString("inspectorUid");
public final DateTimePath<java.time.ZonedDateTime> inspectStatDttm = createDateTime("inspectStatDttm", java.time.ZonedDateTime.class);
public final StringPath inspectState = createString("inspectState");
public final NumberPath<Long> learnGeomUid = createNumber("learnGeomUid", Long.class);
//inherited
public final DateTimePath<java.time.ZonedDateTime> modifiedDate = _super.modifiedDate;
public final ComparablePath<Character> stagnationYn = createComparable("stagnationYn", Character.class);
public final StringPath workerUid = createString("workerUid");
public final DateTimePath<java.time.ZonedDateTime> workStatDttm = createDateTime("workStatDttm", java.time.ZonedDateTime.class);
public final StringPath workState = createString("workState");
public QLabelingAssignmentEntity(String variable) {
super(LabelingAssignmentEntity.class, forVariable(variable));
}
public QLabelingAssignmentEntity(Path<? extends LabelingAssignmentEntity> path) {
super(path.getType(), path.getMetadata());
}
public QLabelingAssignmentEntity(PathMetadata metadata) {
super(LabelingAssignmentEntity.class, metadata);
}
}

View File

@@ -0,0 +1,49 @@
package com.kamco.cd.kamcoback.postgres.entity;
import static com.querydsl.core.types.PathMetadataFactory.*;
import com.querydsl.core.types.dsl.*;
import com.querydsl.core.types.PathMetadata;
import javax.annotation.processing.Generated;
import com.querydsl.core.types.Path;
/**
* QLabelingInspectorEntity is a Querydsl query type for LabelingInspectorEntity
*/
@Generated("com.querydsl.codegen.DefaultEntitySerializer")
public class QLabelingInspectorEntity extends EntityPathBase<LabelingInspectorEntity> {
private static final long serialVersionUID = -1575073251L;
public static final QLabelingInspectorEntity labelingInspectorEntity = new QLabelingInspectorEntity("labelingInspectorEntity");
public final QCommonDateEntity _super = new QCommonDateEntity(this);
public final NumberPath<Long> analUid = createNumber("analUid", Long.class);
//inherited
public final DateTimePath<java.time.ZonedDateTime> createdDate = _super.createdDate;
public final StringPath inspectorUid = createString("inspectorUid");
//inherited
public final DateTimePath<java.time.ZonedDateTime> modifiedDate = _super.modifiedDate;
public final ComparablePath<java.util.UUID> operatorUid = createComparable("operatorUid", java.util.UUID.class);
public QLabelingInspectorEntity(String variable) {
super(LabelingInspectorEntity.class, forVariable(variable));
}
public QLabelingInspectorEntity(Path<? extends LabelingInspectorEntity> path) {
super(path.getType(), path.getMetadata());
}
public QLabelingInspectorEntity(PathMetadata metadata) {
super(LabelingInspectorEntity.class, metadata);
}
}

View File

@@ -0,0 +1,53 @@
package com.kamco.cd.kamcoback.postgres.entity;
import static com.querydsl.core.types.PathMetadataFactory.*;
import com.querydsl.core.types.dsl.*;
import com.querydsl.core.types.PathMetadata;
import javax.annotation.processing.Generated;
import com.querydsl.core.types.Path;
/**
* QMapInkx50kEntity is a Querydsl query type for MapInkx50kEntity
*/
@Generated("com.querydsl.codegen.DefaultEntitySerializer")
public class QMapInkx50kEntity extends EntityPathBase<MapInkx50kEntity> {
private static final long serialVersionUID = 1410103956L;
public static final QMapInkx50kEntity mapInkx50kEntity = new QMapInkx50kEntity("mapInkx50kEntity");
public final QCommonDateEntity _super = new QCommonDateEntity(this);
//inherited
public final DateTimePath<java.time.ZonedDateTime> createdDate = _super.createdDate;
public final NumberPath<Integer> fid = createNumber("fid", Integer.class);
public final ComparablePath<org.locationtech.jts.geom.Geometry> geom = createComparable("geom", org.locationtech.jts.geom.Geometry.class);
public final StringPath mapidcdNo = createString("mapidcdNo");
public final StringPath mapidNm = createString("mapidNm");
public final StringPath mapidNo = createString("mapidNo");
//inherited
public final DateTimePath<java.time.ZonedDateTime> modifiedDate = _super.modifiedDate;
public QMapInkx50kEntity(String variable) {
super(MapInkx50kEntity.class, forVariable(variable));
}
public QMapInkx50kEntity(Path<? extends MapInkx50kEntity> path) {
super(path.getType(), path.getMetadata());
}
public QMapInkx50kEntity(PathMetadata metadata) {
super(MapInkx50kEntity.class, metadata);
}
}

View File

@@ -0,0 +1,67 @@
package com.kamco.cd.kamcoback.postgres.entity;
import static com.querydsl.core.types.PathMetadataFactory.*;
import com.querydsl.core.types.dsl.*;
import com.querydsl.core.types.PathMetadata;
import javax.annotation.processing.Generated;
import com.querydsl.core.types.Path;
import com.querydsl.core.types.dsl.PathInits;
/**
* QMapInkx5kEntity is a Querydsl query type for MapInkx5kEntity
*/
@Generated("com.querydsl.codegen.DefaultEntitySerializer")
public class QMapInkx5kEntity extends EntityPathBase<MapInkx5kEntity> {
private static final long serialVersionUID = 372911320L;
private static final PathInits INITS = PathInits.DIRECT2;
public static final QMapInkx5kEntity mapInkx5kEntity = new QMapInkx5kEntity("mapInkx5kEntity");
public final QCommonDateEntity _super = new QCommonDateEntity(this);
//inherited
public final DateTimePath<java.time.ZonedDateTime> createdDate = _super.createdDate;
public final NumberPath<Integer> fid = createNumber("fid", Integer.class);
public final ComparablePath<org.locationtech.jts.geom.Geometry> geom = createComparable("geom", org.locationtech.jts.geom.Geometry.class);
public final StringPath mapidcdNo = createString("mapidcdNo");
public final StringPath mapidNm = createString("mapidNm");
public final QMapInkx50kEntity mapInkx50k;
//inherited
public final DateTimePath<java.time.ZonedDateTime> modifiedDate = _super.modifiedDate;
public final EnumPath<com.kamco.cd.kamcoback.enums.CommonUseStatus> useInference = createEnum("useInference", com.kamco.cd.kamcoback.enums.CommonUseStatus.class);
public QMapInkx5kEntity(String variable) {
this(MapInkx5kEntity.class, forVariable(variable), INITS);
}
public QMapInkx5kEntity(Path<? extends MapInkx5kEntity> path) {
this(path.getType(), path.getMetadata(), PathInits.getFor(path.getMetadata(), INITS));
}
public QMapInkx5kEntity(PathMetadata metadata) {
this(metadata, PathInits.getFor(metadata, INITS));
}
public QMapInkx5kEntity(PathMetadata metadata, PathInits inits) {
this(MapInkx5kEntity.class, metadata, inits);
}
public QMapInkx5kEntity(Class<? extends MapInkx5kEntity> type, PathMetadata metadata, PathInits inits) {
super(type, metadata, inits);
this.mapInkx50k = inits.isInitialized("mapInkx50k") ? new QMapInkx50kEntity(forProperty("mapInkx50k")) : null;
}
}

View File

@@ -0,0 +1,125 @@
package com.kamco.cd.kamcoback.postgres.entity;
import static com.querydsl.core.types.PathMetadataFactory.*;
import com.querydsl.core.types.dsl.*;
import com.querydsl.core.types.PathMetadata;
import javax.annotation.processing.Generated;
import com.querydsl.core.types.Path;
import com.querydsl.core.types.dsl.PathInits;
/**
* QMapSheetAnalDataInferenceGeomEntity is a Querydsl query type for MapSheetAnalDataInferenceGeomEntity
*/
@Generated("com.querydsl.codegen.DefaultEntitySerializer")
public class QMapSheetAnalDataInferenceGeomEntity extends EntityPathBase<MapSheetAnalDataInferenceGeomEntity> {
private static final long serialVersionUID = -1600559932L;
private static final PathInits INITS = PathInits.DIRECT2;
public static final QMapSheetAnalDataInferenceGeomEntity mapSheetAnalDataInferenceGeomEntity = new QMapSheetAnalDataInferenceGeomEntity("mapSheetAnalDataInferenceGeomEntity");
public final NumberPath<Double> area = createNumber("area", Double.class);
public final ComparablePath<org.locationtech.jts.geom.Geometry> beforeGeom = createComparable("beforeGeom", org.locationtech.jts.geom.Geometry.class);
public final NumberPath<Double> cdProb = createNumber("cdProb", Double.class);
public final StringPath classAfterCd = createString("classAfterCd");
public final NumberPath<Double> classAfterProb = createNumber("classAfterProb", Double.class);
public final StringPath classBeforeCd = createString("classBeforeCd");
public final NumberPath<Double> classBeforeProb = createNumber("classBeforeProb", Double.class);
public final NumberPath<Integer> compareYyyy = createNumber("compareYyyy", Integer.class);
public final DateTimePath<java.time.ZonedDateTime> createdDttm = createDateTime("createdDttm", java.time.ZonedDateTime.class);
public final NumberPath<Long> createdUid = createNumber("createdUid", Long.class);
public final NumberPath<Long> dataUid = createNumber("dataUid", Long.class);
public final DateTimePath<java.time.ZonedDateTime> fileCreatedDttm = createDateTime("fileCreatedDttm", java.time.ZonedDateTime.class);
public final BooleanPath fileCreatedYn = createBoolean("fileCreatedYn");
public final StringPath fitState = createString("fitState");
public final StringPath fitStateCmmnt = createString("fitStateCmmnt");
public final DateTimePath<java.time.ZonedDateTime> fitStateDttm = createDateTime("fitStateDttm", java.time.ZonedDateTime.class);
public final ComparablePath<org.locationtech.jts.geom.Geometry> geom = createComparable("geom", org.locationtech.jts.geom.Geometry.class);
public final ComparablePath<org.locationtech.jts.geom.Geometry> geomCenter = createComparable("geomCenter", org.locationtech.jts.geom.Geometry.class);
public final NumberPath<Long> geomCnt = createNumber("geomCnt", Long.class);
public final StringPath geoType = createString("geoType");
public final NumberPath<Long> geoUid = createNumber("geoUid", Long.class);
public final NumberPath<Long> labelerUid = createNumber("labelerUid", Long.class);
public final DateTimePath<java.time.ZonedDateTime> labelSendDttm = createDateTime("labelSendDttm", java.time.ZonedDateTime.class);
public final StringPath labelState = createString("labelState");
public final DateTimePath<java.time.ZonedDateTime> labelStateDttm = createDateTime("labelStateDttm", java.time.ZonedDateTime.class);
public final StringPath lockYn = createString("lockYn");
public final QMapInkx5kEntity map5k;
public final NumberPath<Long> mapSheetNum = createNumber("mapSheetNum", Long.class);
public final NumberPath<Long> pnu = createNumber("pnu", Long.class);
public final NumberPath<Long> refMapSheetNum = createNumber("refMapSheetNum", Long.class);
public final StringPath resultUid = createString("resultUid");
public final NumberPath<Integer> stage = createNumber("stage", Integer.class);
public final NumberPath<Integer> targetYyyy = createNumber("targetYyyy", Integer.class);
public final NumberPath<Long> testerUid = createNumber("testerUid", Long.class);
public final StringPath testState = createString("testState");
public final DateTimePath<java.time.ZonedDateTime> testStateDttm = createDateTime("testStateDttm", java.time.ZonedDateTime.class);
public final DateTimePath<java.time.ZonedDateTime> updatedDttm = createDateTime("updatedDttm", java.time.ZonedDateTime.class);
public final NumberPath<Long> updatedUid = createNumber("updatedUid", Long.class);
public final ComparablePath<java.util.UUID> uuid = createComparable("uuid", java.util.UUID.class);
public QMapSheetAnalDataInferenceGeomEntity(String variable) {
this(MapSheetAnalDataInferenceGeomEntity.class, forVariable(variable), INITS);
}
public QMapSheetAnalDataInferenceGeomEntity(Path<? extends MapSheetAnalDataInferenceGeomEntity> path) {
this(path.getType(), path.getMetadata(), PathInits.getFor(path.getMetadata(), INITS));
}
public QMapSheetAnalDataInferenceGeomEntity(PathMetadata metadata) {
this(metadata, PathInits.getFor(metadata, INITS));
}
public QMapSheetAnalDataInferenceGeomEntity(PathMetadata metadata, PathInits inits) {
this(MapSheetAnalDataInferenceGeomEntity.class, metadata, inits);
}
public QMapSheetAnalDataInferenceGeomEntity(Class<? extends MapSheetAnalDataInferenceGeomEntity> type, PathMetadata metadata, PathInits inits) {
super(type, metadata, inits);
this.map5k = inits.isInitialized("map5k") ? new QMapInkx5kEntity(forProperty("map5k"), inits.get("map5k")) : null;
}
}

View File

@@ -0,0 +1,110 @@
package com.kamco.cd.kamcoback.postgres.entity;
import static com.querydsl.core.types.PathMetadataFactory.*;
import com.querydsl.core.types.dsl.*;
import com.querydsl.core.types.PathMetadata;
import javax.annotation.processing.Generated;
import com.querydsl.core.types.Path;
import com.querydsl.core.types.dsl.PathInits;
/**
* QMapSheetAnalInferenceEntity is a Querydsl query type for MapSheetAnalInferenceEntity
*/
@Generated("com.querydsl.codegen.DefaultEntitySerializer")
public class QMapSheetAnalInferenceEntity extends EntityPathBase<MapSheetAnalInferenceEntity> {
private static final long serialVersionUID = -1438711566L;
public static final QMapSheetAnalInferenceEntity mapSheetAnalInferenceEntity = new QMapSheetAnalInferenceEntity("mapSheetAnalInferenceEntity");
public final NumberPath<Double> accuracy = createNumber("accuracy", Double.class);
public final DateTimePath<java.time.ZonedDateTime> analEndDttm = createDateTime("analEndDttm", java.time.ZonedDateTime.class);
public final NumberPath<Long> analPredSec = createNumber("analPredSec", Long.class);
public final NumberPath<Long> analSec = createNumber("analSec", Long.class);
public final StringPath analState = createString("analState");
public final DateTimePath<java.time.ZonedDateTime> analStrtDttm = createDateTime("analStrtDttm", java.time.ZonedDateTime.class);
public final StringPath analTargetType = createString("analTargetType");
public final StringPath analTitle = createString("analTitle");
public final StringPath baseMapSheetNum = createString("baseMapSheetNum");
public final NumberPath<Integer> compareYyyy = createNumber("compareYyyy", Integer.class);
public final DateTimePath<java.time.ZonedDateTime> createdDttm = createDateTime("createdDttm", java.time.ZonedDateTime.class);
public final NumberPath<Long> createdUid = createNumber("createdUid", Long.class);
public final NumberPath<Long> detectingCnt = createNumber("detectingCnt", Long.class);
public final StringPath detectingDescription = createString("detectingDescription");
public final StringPath detectionDataOption = createString("detectionDataOption");
public final DateTimePath<java.time.ZonedDateTime> gukyuinApplyDttm = createDateTime("gukyuinApplyDttm", java.time.ZonedDateTime.class);
public final StringPath gukyuinUsed = createString("gukyuinUsed");
public final MapPath<String, Object, SimplePath<Object>> hyperParams = this.<String, Object, SimplePath<Object>>createMap("hyperParams", String.class, Object.class, SimplePath.class);
public final NumberPath<Long> id = createNumber("id", Long.class);
public final StringPath inspectionClosedYn = createString("inspectionClosedYn");
public final StringPath labelingClosedYn = createString("labelingClosedYn");
public final NumberPath<Long> learnId = createNumber("learnId", Long.class);
public final StringPath modelM1Ver = createString("modelM1Ver");
public final StringPath modelM2Ver = createString("modelM2Ver");
public final StringPath modelM3Ver = createString("modelM3Ver");
public final NumberPath<Long> modelUid = createNumber("modelUid", Long.class);
public final NumberPath<Long> modelVerUid = createNumber("modelVerUid", Long.class);
public final StringPath resultUrl = createString("resultUrl");
public final StringPath serverIds = createString("serverIds");
public final NumberPath<Integer> stage = createNumber("stage", Integer.class);
public final NumberPath<Integer> targetYyyy = createNumber("targetYyyy", Integer.class);
public final StringPath testRate = createString("testRate");
public final ListPath<Double, NumberPath<Double>> tranningRate = this.<Double, NumberPath<Double>>createList("tranningRate", Double.class, NumberPath.class, PathInits.DIRECT2);
public final DateTimePath<java.time.ZonedDateTime> updatedDttm = createDateTime("updatedDttm", java.time.ZonedDateTime.class);
public final NumberPath<Long> updatedUid = createNumber("updatedUid", Long.class);
public final ComparablePath<java.util.UUID> uuid = createComparable("uuid", java.util.UUID.class);
public final ListPath<Double, NumberPath<Double>> validationRate = this.<Double, NumberPath<Double>>createList("validationRate", Double.class, NumberPath.class, PathInits.DIRECT2);
public QMapSheetAnalInferenceEntity(String variable) {
super(MapSheetAnalInferenceEntity.class, forVariable(variable));
}
public QMapSheetAnalInferenceEntity(Path<? extends MapSheetAnalInferenceEntity> path) {
super(path.getType(), path.getMetadata());
}
public QMapSheetAnalInferenceEntity(PathMetadata metadata) {
super(MapSheetAnalInferenceEntity.class, metadata);
}
}

View File

@@ -0,0 +1,59 @@
package com.kamco.cd.kamcoback.postgres.entity;
import static com.querydsl.core.types.PathMetadataFactory.*;
import com.querydsl.core.types.dsl.*;
import com.querydsl.core.types.PathMetadata;
import javax.annotation.processing.Generated;
import com.querydsl.core.types.Path;
/**
* QMapSheetLearnDataGeomEntity is a Querydsl query type for MapSheetLearnDataGeomEntity
*/
@Generated("com.querydsl.codegen.DefaultEntitySerializer")
public class QMapSheetLearnDataGeomEntity extends EntityPathBase<MapSheetLearnDataGeomEntity> {
private static final long serialVersionUID = 1704278203L;
public static final QMapSheetLearnDataGeomEntity mapSheetLearnDataGeomEntity = new QMapSheetLearnDataGeomEntity("mapSheetLearnDataGeomEntity");
public final QCommonDateEntity _super = new QCommonDateEntity(this);
public final NumberPath<Integer> afterYyyy = createNumber("afterYyyy", Integer.class);
public final NumberPath<Double> area = createNumber("area", Double.class);
public final NumberPath<Integer> beforeYyyy = createNumber("beforeYyyy", Integer.class);
public final StringPath classAfterCd = createString("classAfterCd");
public final StringPath classBeforeCd = createString("classBeforeCd");
//inherited
public final DateTimePath<java.time.ZonedDateTime> createdDate = _super.createdDate;
public final BooleanPath fileCreateYn = createBoolean("fileCreateYn");
public final ComparablePath<org.locationtech.jts.geom.Geometry> geom = createComparable("geom", org.locationtech.jts.geom.Geometry.class);
public final NumberPath<Long> geoUid = createNumber("geoUid", Long.class);
//inherited
public final DateTimePath<java.time.ZonedDateTime> modifiedDate = _super.modifiedDate;
public QMapSheetLearnDataGeomEntity(String variable) {
super(MapSheetLearnDataGeomEntity.class, forVariable(variable));
}
public QMapSheetLearnDataGeomEntity(Path<? extends MapSheetLearnDataGeomEntity> path) {
super(path.getType(), path.getMetadata());
}
public QMapSheetLearnDataGeomEntity(PathMetadata metadata) {
super(MapSheetLearnDataGeomEntity.class, metadata);
}
}

View File

@@ -0,0 +1,141 @@
package com.kamco.cd.kamcoback.postgres.entity;
import static com.querydsl.core.types.PathMetadataFactory.*;
import com.querydsl.core.types.dsl.*;
import com.querydsl.core.types.PathMetadata;
import javax.annotation.processing.Generated;
import com.querydsl.core.types.Path;
/**
* QMapSheetLearnEntity is a Querydsl query type for MapSheetLearnEntity
*/
@Generated("com.querydsl.codegen.DefaultEntitySerializer")
public class QMapSheetLearnEntity extends EntityPathBase<MapSheetLearnEntity> {
private static final long serialVersionUID = 1571348757L;
public static final QMapSheetLearnEntity mapSheetLearnEntity = new QMapSheetLearnEntity("mapSheetLearnEntity");
public final DateTimePath<java.time.ZonedDateTime> applyDttm = createDateTime("applyDttm", java.time.ZonedDateTime.class);
public final StringPath applyStatus = createString("applyStatus");
public final DateTimePath<java.time.ZonedDateTime> applyStatusDttm = createDateTime("applyStatusDttm", java.time.ZonedDateTime.class);
public final BooleanPath applyYn = createBoolean("applyYn");
public final StringPath chnDtctMstId = createString("chnDtctMstId");
public final NumberPath<Integer> compareYyyy = createNumber("compareYyyy", Integer.class);
public final DateTimePath<java.time.ZonedDateTime> createdDttm = createDateTime("createdDttm", java.time.ZonedDateTime.class);
public final NumberPath<Long> createdUid = createNumber("createdUid", Long.class);
public final NumberPath<Long> detectEndCnt = createNumber("detectEndCnt", Long.class);
public final NumberPath<Long> detectingCnt = createNumber("detectingCnt", Long.class);
public final StringPath detectOption = createString("detectOption");
public final DateTimePath<java.time.ZonedDateTime> elapsedTime = createDateTime("elapsedTime", java.time.ZonedDateTime.class);
public final NumberPath<Long> id = createNumber("id", Long.class);
public final DateTimePath<java.time.ZonedDateTime> inferEndDttm = createDateTime("inferEndDttm", java.time.ZonedDateTime.class);
public final DateTimePath<java.time.ZonedDateTime> inferStartDttm = createDateTime("inferStartDttm", java.time.ZonedDateTime.class);
public final NumberPath<Integer> m1CompletedJobs = createNumber("m1CompletedJobs", Integer.class);
public final NumberPath<Integer> m1FailedJobs = createNumber("m1FailedJobs", Integer.class);
public final NumberPath<Long> m1ModelBatchId = createNumber("m1ModelBatchId", Long.class);
public final DateTimePath<java.time.ZonedDateTime> m1ModelEndDttm = createDateTime("m1ModelEndDttm", java.time.ZonedDateTime.class);
public final DateTimePath<java.time.ZonedDateTime> m1ModelStartDttm = createDateTime("m1ModelStartDttm", java.time.ZonedDateTime.class);
public final ComparablePath<java.util.UUID> m1ModelUuid = createComparable("m1ModelUuid", java.util.UUID.class);
public final NumberPath<Integer> m1PendingJobs = createNumber("m1PendingJobs", Integer.class);
public final NumberPath<Integer> m1RunningJobs = createNumber("m1RunningJobs", Integer.class);
public final NumberPath<Integer> m2CompletedJobs = createNumber("m2CompletedJobs", Integer.class);
public final NumberPath<Integer> m2FailedJobs = createNumber("m2FailedJobs", Integer.class);
public final NumberPath<Long> m2ModelBatchId = createNumber("m2ModelBatchId", Long.class);
public final DateTimePath<java.time.ZonedDateTime> m2ModelEndDttm = createDateTime("m2ModelEndDttm", java.time.ZonedDateTime.class);
public final DateTimePath<java.time.ZonedDateTime> m2ModelStartDttm = createDateTime("m2ModelStartDttm", java.time.ZonedDateTime.class);
public final ComparablePath<java.util.UUID> m2ModelUuid = createComparable("m2ModelUuid", java.util.UUID.class);
public final NumberPath<Integer> m2PendingJobs = createNumber("m2PendingJobs", Integer.class);
public final NumberPath<Integer> m2RunningJobs = createNumber("m2RunningJobs", Integer.class);
public final NumberPath<Integer> m3CompletedJobs = createNumber("m3CompletedJobs", Integer.class);
public final NumberPath<Integer> m3FailedJobs = createNumber("m3FailedJobs", Integer.class);
public final NumberPath<Long> m3ModelBatchId = createNumber("m3ModelBatchId", Long.class);
public final DateTimePath<java.time.ZonedDateTime> m3ModelEndDttm = createDateTime("m3ModelEndDttm", java.time.ZonedDateTime.class);
public final DateTimePath<java.time.ZonedDateTime> m3ModelStartDttm = createDateTime("m3ModelStartDttm", java.time.ZonedDateTime.class);
public final ComparablePath<java.util.UUID> m3ModelUuid = createComparable("m3ModelUuid", java.util.UUID.class);
public final NumberPath<Integer> m3PendingJobs = createNumber("m3PendingJobs", Integer.class);
public final NumberPath<Integer> m3RunningJobs = createNumber("m3RunningJobs", Integer.class);
public final StringPath mapSheetCnt = createString("mapSheetCnt");
public final StringPath mapSheetScope = createString("mapSheetScope");
public final StringPath modelComparePath = createString("modelComparePath");
public final StringPath modelTargetPath = createString("modelTargetPath");
public final StringPath runningModelType = createString("runningModelType");
public final NumberPath<Integer> stage = createNumber("stage", Integer.class);
public final StringPath status = createString("status");
public final NumberPath<Integer> targetYyyy = createNumber("targetYyyy", Integer.class);
public final StringPath title = createString("title");
public final NumberPath<Long> totalJobs = createNumber("totalJobs", Long.class);
public final StringPath uid = createString("uid");
public final DateTimePath<java.time.ZonedDateTime> updatedDttm = createDateTime("updatedDttm", java.time.ZonedDateTime.class);
public final NumberPath<Long> updatedUid = createNumber("updatedUid", Long.class);
public final ComparablePath<java.util.UUID> uuid = createComparable("uuid", java.util.UUID.class);
public QMapSheetLearnEntity(String variable) {
super(MapSheetLearnEntity.class, forVariable(variable));
}
public QMapSheetLearnEntity(Path<? extends MapSheetLearnEntity> path) {
super(path.getType(), path.getMetadata());
}
public QMapSheetLearnEntity(PathMetadata metadata) {
super(MapSheetLearnEntity.class, metadata);
}
}

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
com.kamco.cd.kamcoback.KamcoBackApplication

View File

@@ -0,0 +1,4 @@
server:
port: 9080

View File

@@ -0,0 +1,67 @@
server:
port: 9080
spring:
application:
name: label-to-review
profiles:
active: dev # 사용할 프로파일 지정 (ex. dev, prod, test)
datasource:
url: jdbc:postgresql://192.168.2.127:15432/kamco_cds
#url: jdbc:postgresql://localhost:5432/kamco_cds
username: kamco_cds
password: kamco_cds_Q!W@E#R$
hikari:
minimum-idle: 1
maximum-pool-size: 5
jpa:
hibernate:
ddl-auto: update # 테이블이 없으면 생성, 있으면 업데이트
properties:
hibernate:
jdbc:
batch_size: 50
default_batch_fetch_size: 100
logging:
level:
root: INFO
org.springframework.web: DEBUG
org.springframework.security: DEBUG
# 헬스체크 노이즈 핵심만 다운
org.springframework.security.web.FilterChainProxy: INFO
org.springframework.security.web.authentication.AnonymousAuthenticationFilter: INFO
org.springframework.security.web.authentication.Http403ForbiddenEntryPoint: INFO
org.springframework.web.servlet.DispatcherServlet: INFO
# actuator
management:
health:
readinessstate:
enabled: true
livenessstate:
enabled: true
endpoint:
health:
probes:
enabled: true
show-details: always
endpoints:
jmx:
exposure:
exclude: "*"
web:
base-path: /monitor
exposure:
include:
- "health"
file:
#sync-root-dir: D:/kamco-nfs/images/
sync-root-dir: /kamco-nfs/images/
sync-tmp-dir: ${file.sync-root-dir}/tmp
sync-file-extention: tfw,tif
sync-auto-exception-start-year: 2025
sync-auto-exception-before-year-cnt: 3

View File

@@ -0,0 +1,67 @@
server:
port: 9080
spring:
application:
name: imagery-make-dataset
profiles:
active: local # 사용할 프로파일 지정 (ex. dev, prod, test)
datasource:
url: jdbc:postgresql://192.168.2.127:15432/kamco_cds
#url: jdbc:postgresql://localhost:5432/kamco_cds
username: kamco_cds
password: kamco_cds_Q!W@E#R$
hikari:
minimum-idle: 1
maximum-pool-size: 5
jpa:
hibernate:
ddl-auto: update # 테이블이 없으면 생성, 있으면 업데이트
properties:
hibernate:
jdbc:
batch_size: 50
default_batch_fetch_size: 100
logging:
level:
root: INFO
org.springframework.web: DEBUG
org.springframework.security: DEBUG
# 헬스체크 노이즈 핵심만 다운
org.springframework.security.web.FilterChainProxy: INFO
org.springframework.security.web.authentication.AnonymousAuthenticationFilter: INFO
org.springframework.security.web.authentication.Http403ForbiddenEntryPoint: INFO
org.springframework.web.servlet.DispatcherServlet: INFO
# actuator
management:
health:
readinessstate:
enabled: true
livenessstate:
enabled: true
endpoint:
health:
probes:
enabled: true
show-details: always
endpoints:
jmx:
exposure:
exclude: "*"
web:
base-path: /monitor
exposure:
include:
- "health"
file:
#sync-root-dir: D:/kamco-nfs/images/
sync-root-dir: /kamco-nfs/images/
sync-tmp-dir: ${file.sync-root-dir}/tmp
sync-file-extention: tfw,tif
sync-auto-exception-start-year: 2025
sync-auto-exception-before-year-cnt: 3

View File

@@ -0,0 +1,67 @@
server:
port: 9080
spring:
application:
name: imagery-make-dataset
profiles:
active: prod # 사용할 프로파일 지정 (ex. dev, prod, test)
datasource:
url: jdbc:postgresql://192.168.2.127:15432/kamco_cds
#url: jdbc:postgresql://localhost:5432/kamco_cds
username: kamco_cds
password: kamco_cds_Q!W@E#R$
hikari:
minimum-idle: 1
maximum-pool-size: 5
jpa:
hibernate:
ddl-auto: update # 테이블이 없으면 생성, 있으면 업데이트
properties:
hibernate:
jdbc:
batch_size: 50
default_batch_fetch_size: 100
logging:
level:
root: INFO
org.springframework.web: DEBUG
org.springframework.security: DEBUG
# 헬스체크 노이즈 핵심만 다운
org.springframework.security.web.FilterChainProxy: INFO
org.springframework.security.web.authentication.AnonymousAuthenticationFilter: INFO
org.springframework.security.web.authentication.Http403ForbiddenEntryPoint: INFO
org.springframework.web.servlet.DispatcherServlet: INFO
# actuator
management:
health:
readinessstate:
enabled: true
livenessstate:
enabled: true
endpoint:
health:
probes:
enabled: true
show-details: always
endpoints:
jmx:
exposure:
exclude: "*"
web:
base-path: /monitor
exposure:
include:
- "health"
file:
#sync-root-dir: D:/kamco-nfs/images/
sync-root-dir: /kamco-nfs/images/
sync-tmp-dir: ${file.sync-root-dir}/tmp
sync-file-extention: tfw,tif
sync-auto-exception-start-year: 2025
sync-auto-exception-before-year-cnt: 3

View File

@@ -0,0 +1,137 @@
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<title>Chunk Upload Test</title>
</head>
<body>
<h2>대용량 파일 청크 업로드 테스트</h2>
* Chunk 테스트 사이즈 10M (10 * 1024 * 1024) - 성능에 따라 변경가능<br><br>
* 업로드 API선택</br></br>
<select name="apiUrl" id="apiUrl" style="width:600px;height:40px;">
<option value="/api/model/file-chunk-upload">모델파일Chunk업로드 ( /api/model/file-chunk-upload )</option>
<option value="/api/upload/file-chunk-upload">파일Chunk업로드(공통) ( /api/upload/file-chunk-upload )</option>
</select>
<br><br>
* 파일첨부<br><br>
<input type="file" id="chunkFile" style="height:40px;"><br><br>
<button onclick="startUpload()" style="height:40px;">업로드 시작</button>
<br><br><br><br>
* 업로드시 업로드 이력을 추적하기 위해 UUID생성해서 전달(파일병합시 사용)(script 예제참고)</br></br>
UUID : <input id="uuid" name="uuid" value="" style="width:300px;height:30px;" readonly><br><br>
* API 호출시 파일정보 추출해서 자동 할당해야 함.(script 예제참고)</br></br>
chunkIndex : <input style="height:30px;" id="chunkIndex" placeholder="chunkIndex" readonly><br><br>
chunkTotalIndex : <input style="height:30px;" id="chunkTotalIndex" placeholder="chunkTotalIndex" readonly ><br><br>
* API 호출시 파일정보 추출해서 자동 할당해야 함.(script 예제참고)</br></br>
fileSize : <input style="height:30px;" id="fileSize" placeholder="fileSize" readonly><br><br>
<!--
fileHash : <input id="fileHash" placeholder="fileHash"><br><br> -->
<br><br>
* 진행율(%)</br></br>
<div style="width:500px;height:30px;border:1px solid #cccccc;"><div id="prgssbar" style="width:100%;height:30px;background:#eeeeee;"></div></div>
<br><br>
* 결과메세지</br></br>
<div id="status" style="padding:20px;width:1200px;height:600px;border:1px solid #000000;"></div>
<script>
async function startUpload() {
const apiUrl = document.getElementById('apiUrl').value;
const file = document.getElementById('chunkFile').files[0];
const fileName = file.name;
//const datasetUid = Number(document.getElementById('datasetUid').value);
//const chunkIndex = document.getElementById('chunkIndex').value;
if (!file) return alert("파일을 선택하세요.");
const CHUNK_SIZE = 10 * 1024 * 1024; // 5MB
const fileSize = file.size;
var totalChunks = Math.ceil(fileSize / CHUNK_SIZE);
const chunkTotalIndex = totalChunks - 1;
const uuid = crypto.randomUUID(); // 고유 ID 생성
//var uuid = "";
document.getElementById('uuid').value = uuid;
document.getElementById('fileSize').value = file.size;
document.getElementById('chunkTotalIndex').value = chunkTotalIndex;
for (let i = 0; i < totalChunks; i++) {
//for (let i = 0; i < 1; i++) {
const start = i * CHUNK_SIZE;
const end = Math.min(start + CHUNK_SIZE, file.size);
const chunk = file.slice(start, end);
document.getElementById('chunkIndex').value = i;
const formData = new FormData();
formData.append("uuid", uuid);
formData.append("fileSize", fileSize);
formData.append("fileName", fileName);
formData.append("chunkIndex", i);
formData.append("chunkTotalIndex", chunkTotalIndex);
formData.append("chunkFile", chunk);
try {
const response = await fetch(apiUrl, { method: 'POST', body: formData });
// 2. 응답 상태 확인 (200 OK 등)
if (!response.ok) {
throw new Error(`서버 에러: ${response.status}`);
}
// 3. 서버가 보낸 데이터 읽기 (JSON 형태라고 가정)
const result = await response.json();
document.getElementById('status').innerText = JSON.stringify(result, null, 2);
if( result.data.res != "success")
{
//오류 경고창 띄우는 것으로 처리하시면 됩니다.
break;
}
document.getElementById('prgssbar').style.width = result.data.uploadRate+"%";
} catch (error) {
console.error(`${i}번째 청크 업로드 실패:`, error);
break; // 오류 발생 시 중단
}
}
// 모든 청크 전송 후 최종 완료 요청
//var mergeResult = await completeUpload(uuid);
//document.getElementById('status').innerText = JSON.stringify(mergeResult, null, 2);
}
async function completeUpload(uuid) {
try {
const response = await fetch(`/api/upload/chunk-upload-complete/${uuid}`, {
method: 'PUT',
headers: {
'Content-Type': 'application/json'
},
});
if (!response.ok) {
throw new Error(`서ver 응답 에러: ${response.status}`);
}
const result = await response.json();
return result;
} catch (error) {
console.error("완료 요청 중 오류 발생:", error);
}
}
</script>
</body>
</html>

View File

@@ -0,0 +1,12 @@
Manifest-Version: 1.0
Main-Class: org.springframework.boot.loader.launch.JarLauncher
Start-Class: com.kamco.cd.kamcoback.KamcoBackApplication
Spring-Boot-Version: 3.5.7
Spring-Boot-Classes: BOOT-INF/classes/
Spring-Boot-Lib: BOOT-INF/lib/
Spring-Boot-Classpath-Index: BOOT-INF/classpath.idx
Spring-Boot-Layers-Index: BOOT-INF/layers.idx
Build-Jdk-Spec: 21
Implementation-Title: kamco-review-to-down-job
Implementation-Version: 0.0.1-SNAPSHOT

View File

@@ -0,0 +1 @@
1

View File

View File

@@ -0,0 +1,35 @@
services:
kamco-changedetection-api:
build:
context: .
dockerfile: Dockerfile-dev
args:
UID: 1000 # manager01 UID
GID: 1000 # manager01 GID
image: kamco-changedetection-api:${IMAGE_TAG:-latest}
container_name: kamco-changedetection-api
user: "1000:1000"
ports:
- "7100:8080"
environment:
- SPRING_PROFILES_ACTIVE=dev
- TZ=Asia/Seoul
volumes:
- /mnt/nfs_share/images:/app/original-images
- /mnt/nfs_share/model_output:/app/model-outputs
- /mnt/nfs_share/train_dataset:/app/train-dataset
- /mnt/nfs_share/tmp:/app/tmp
- /kamco-nfs:/kamco-nfs
networks:
- kamco-cds
restart: unless-stopped
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8080/monitor/health" ]
interval: 10s
timeout: 5s
retries: 5
start_period: 40s
networks:
kamco-cds:
external: true

Binary file not shown.

View File

@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

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