Files
sdl_base/README.md
T
koreafood 12c40c6004 feat(board-generator): add board code generator and sample CRUD artifacts
Add Node.js CLI tool with Handlebars templates for generating standard CRUD artifacts: Java entity, service, DAO, controller, MyBatis mapper XML, and Vue frontend pages.
Also generate the full SampleTableBoard CRUD reference implementation, update README with backend execution instructions, and add project plan documentation.
2026-05-31 13:22:03 +09:00

4.1 KiB

SDL Base

Spring Boot 3 기반 백엔드와 Vue 3/Vite 기반 프론트엔드가 함께 있는 통합 프로젝트입니다.

개요

  • 백엔드: Spring Boot 3.3.0, Java 17, Maven, MyBatis
  • 프론트엔드: Vue 3, Vite 5, Vue Router, Vuex
  • 배치: Quartz Scheduler
  • 문서: doc/ 하위 AsciiDoc/HTML 문서
  • 프로필: local, dev, prod

프로젝트 구조

sdl-base/
├── src/main/java/                # Spring Boot 애플리케이션, 설정, 컨트롤러, 서비스
├── src/main/resources/           # 공통 리소스, 메시지, MyBatis 매퍼
├── src/main/resources-local/     # local 프로필 설정
├── src/main/resources-dev/       # dev 프로필 설정
├── src/main/resources-prod/      # prod 프로필 설정
├── frontend/                     # Vue 3 + Vite 프론트엔드
├── doc/                          # 설치/구성/기능 문서
├── source/                       # 로컬 Maven 저장소로 참조하는 SDL 라이브러리
├── pom.xml                       # 백엔드 빌드 설정
└── plan.md                       # 작업 메모 및 환경 정보

주요 실행 흐름

  1. 백엔드는 com.samsung.SdlBaseBootApplication에서 시작합니다.
  2. local 프로필에서는 config.propertiesdatasource.* 값을 사용해 직접 DB에 연결합니다.
  3. dev, prod 프로필에서는 db.jndi=sdl_ds 기반 JNDI 데이터소스를 사용합니다.
  4. MyBatis 매퍼는 PostgreSQL 경로인 src/main/resources/sql/mybatis/postgresql/를 사용합니다.
  5. 프론트엔드는 frontend/에서 Vite로 실행하거나 빌드 산출물을 백엔드 정적 리소스로 내보냅니다.

실행 전 준비

백엔드

  • Java 17 이상
  • Maven 3.9 이상 또는 프로젝트 포함 ./mvnw
  • PostgreSQL 접근 가능 환경
  • 필요 시 JASYPT_KEY 환경변수 설정

예시:

export JASYPT_KEY=your-jasypt-key

프론트엔드

  • Node.js 20.14.0 이상
  • npm

로컬 실행 방법

1. 프론트엔드 의존성 설치

cd frontend
npm install

2. 프론트엔드 개발 서버 실행

cd frontend
npm run local
  • 기본 포트: 8081
  • API 대상: http://localhost:8080

3. 백엔드 실행

프로젝트 루트에서 실행합니다.

./mvnw spring-boot:run -Plocal

또는 IDE에서 com.samsung.SdlBaseBootApplication을 Spring Boot Application으로 실행하면 됩니다.

빌드 방법

백엔드 빌드

./mvnw clean package

백엔드 실행

mvn spring-boot:run -Plocal -Dspring-boot.run.jvmArguments=-DJASYPT_KEY=test-key

프론트엔드 운영 빌드

cd frontend
npm run build

기본 운영 빌드 결과물은 frontend/.env.productionVITE_DIST_PATH 설정에 따라 백엔드 웹 리소스 경로로 출력됩니다.

프로필별 설정 파일

  • src/main/resources-local/application.properties
  • src/main/resources-local/config.properties
  • src/main/resources-dev/application.properties
  • src/main/resources-dev/config.properties
  • src/main/resources-prod/application.properties
  • src/main/resources-prod/config.properties

DB 연결 정보

plan.md 기준으로 현재 반영된 PostgreSQL 정보는 다음과 같습니다.

  • DBMS: PostgreSQL
  • 호스트: 192.168.0.60
  • 포트: 5432
  • 데이터베이스: casaos
  • 사용자: casaos
  • 비밀번호: casaos

적용 위치:

  • 로컬 메인 데이터소스: src/main/resources-local/config.properties
  • Quartz 데이터소스: src/main/resources-dev/application.properties
  • Quartz 데이터소스: src/main/resources-prod/application.properties

참고 문서

  • 설치 문서: doc/설치/로컬설치.adoc
  • Quartz 문서: doc/Appendix/QuartzClustering.adoc
  • 전체 문서 인덱스: doc/index.html

확인 메모

  • 현재 백엔드 MyBatis 설정은 PostgreSQL 매퍼 경로를 사용하도록 정리했습니다.
  • dev, prod는 애플리케이션 메인 데이터소스를 JNDI로 조회하므로 WAS/JNDI 설정도 별도로 맞아야 합니다.