Asgard 는 DSD 의 User Server (Vision) 의 스케줄러 작업을 위한 Spring Batch 기반 서비스입니다.
<aside> <img src="/icons/info-alternate_gray.svg" alt="/icons/info-alternate_gray.svg" width="40px" /> 사전 준비사항
**Github : https://github.com/dotslashdashdev/asgard**
</aside>
<aside> <img src="/icons/list_gray.svg" alt="/icons/list_gray.svg" width="40px" /> Table of contents
</aside>
(vision 의 DB, redis 가 구동 중 이어야 합니다.)
vision 의 docker-compose.yaml로 docker구동 필요
asgard 설정 확인
spring:
data:
redis:
host: localhost
port: 6379
password:
lettuce: # Redis 커넥션 풀 설정
pool:
max-active: 100 # 커넥션 풀에서 동시에 활성화될 수 있는 최대 커넥션 수
max-idle: 50 # 풀에 유지될 수 있는 최대 유휴(사용되지 않는) 커넥션 수
min-idle: 0 # 풀이 유지해야 하는 최소 유휴 커넥션 수
datasource: # vision 과 동일하게 설정
postgresql:
url: jdbc:postgresql://localhost:5432/dotslashdash
username: appuser
password: appuser
driverClassName: org.postgresql.Driver
jpa:
hibernate:
ddl-auto: none
properties:
hibernate:
format_sql: true
show-sql: false # true 로 설정하면 SQL 를 볼 수 있숩나다.
#logging: # SQL 의 ? 값이 같이 출력된니다.
# level:
# org:
# hibernate:
# orm:
# jdbc:
# bind: trace
global:
env-state: local
slack-url: "<https://hooks.slack.com/services/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>" # 테스트-백엔드-채널2

Edit Configurations 선택


1번 클릭 후, 2번 화면이 뜨면 환경변수가 알맞게 적용되었는지 확인

└─ src
└── main
├── avro․․․․․․․․․․․․․․․․․․․․# Kafka Avro 객체용 AVSC 파일
├── kotlin/com/dot/asgard․․․# 소스 코드 루트 디렉토리
│ ├── batch․․․․․․․․․․․․․․․․․# Batch 작업 관련 코드
│ ├── common․․․․․․․․․․․․․․․․# 공통 코드
│ │ ├── constants․․․․․․․․․․․# 상수 정의
│ │ ├── enums․․․․․․․․․․․․․․․# 열거형 타입 (Enum) 정의
│ │ └── messages․․․․․․․․․․․․# 열거형 타입에서 사용되는 메세지 (정의만 되어있을 뿐 사용하지 않음)
│ ├── config․․․․․․․․․․․․․․․․# 설정 관련 코드 (DB 연결, 스케줄러,JPA, Redis)
│ ├── entity․․․․․․․․․․․․․․․․# vision DB와 매팅되는 엔티티
│ ├── listener․․․․․․․․․․․․․․# Batch Job 리스너
│ ├── repository․․․․․․․․․․․․# JPA 레포지토리
│ ├── service․․․․․․․․․․․․․․․# 서비스 클래스 (Batch 에서 사용하는 비즈니스 로직)
│ │ └── integration․․․․․․․․․# 외부 시스템과의 통합 로직
│ └── writer․․․․․․․․․․․․․․․․# Batch 에서 사용되는 Writer
│ └──(AsgardApplication․kt) # 애플리케이션 시작 파일 (main)
└── resources․․․․․․․․․․․․․․․# 애플리케이션 리소스
└── config․․․․․․․․․․․․․․․․․․# 애플리케이션 설정
└─(build․gradle․kts)․․․․․․․․․․# Gradle 의 Kotlin DSL 을 사용하여 작성된 빌드 구성 스크립트
(Dockerfile)․․․․․․․․․․․․․․․․# 배포시 빌드되는 Dockerfile