feat: 가계부·게시판 백엔드 API 구현
- com.sb.web 패키지로 재구성: account / auth / board / user / admin / common - 가계부(account): 내역(필터), 계좌·순자산, 예산, 분류, 정기 거래, 투자 포트폴리오 (종목·매매 이력, 이동평균 평단·실현/평가손익) - MyBatis + MariaDB + Redis 세션, BCrypt - 스키마 자동 초기화(db/*.sql, 멱등), 사용자별 데이터 격리(member_id) - 문서: docs/BACKEND.md, .env.example Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -4,28 +4,39 @@ server:
|
||||
context-path: /
|
||||
|
||||
spring:
|
||||
# 로컬 개발 시 .env(properties 형식, git 미추적)에서 환경변수 로드. 없으면 OS/컨테이너 환경변수 사용.
|
||||
config:
|
||||
import: optional:file:.env[.properties]
|
||||
|
||||
application:
|
||||
name: sb_bt
|
||||
|
||||
# ===== MariaDB =====
|
||||
# ===== SQL 초기화 ===== 기동 시 member 테이블 자동 생성(IF NOT EXISTS 라 멱등)
|
||||
sql:
|
||||
init:
|
||||
mode: always
|
||||
schema-locations: classpath:db/member.sql,classpath:db/board.sql,classpath:db/account.sql,classpath:db/dev-seed.sql
|
||||
continue-on-error: true
|
||||
|
||||
# ===== MariaDB ===== (접속 정보는 환경변수로 외부화)
|
||||
datasource:
|
||||
driver-class-name: org.mariadb.jdbc.Driver
|
||||
url: jdbc:mariadb://localhost:3306/sb_db?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Seoul
|
||||
username: sb_user
|
||||
password: sb_pass
|
||||
url: ${DB_URL:jdbc:mariadb://localhost:3306/sb_db?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Seoul}
|
||||
username: ${DB_USERNAME:root}
|
||||
password: ${DB_PASSWORD:}
|
||||
hikari:
|
||||
maximum-pool-size: 10
|
||||
minimum-idle: 2
|
||||
connection-timeout: 30000
|
||||
pool-name: sbHikariPool
|
||||
|
||||
# ===== Redis =====
|
||||
# ===== Redis ===== (접속 정보는 환경변수로 외부화)
|
||||
data:
|
||||
redis:
|
||||
host: localhost
|
||||
port: 6379
|
||||
password:
|
||||
database: 0
|
||||
host: ${REDIS_HOST:localhost}
|
||||
port: ${REDIS_PORT:6379}
|
||||
password: ${REDIS_PASSWORD:}
|
||||
database: ${REDIS_DATABASE:0}
|
||||
timeout: 3000ms
|
||||
lettuce:
|
||||
pool:
|
||||
@@ -35,7 +46,7 @@ spring:
|
||||
|
||||
# ===== MyBatis =====
|
||||
mybatis:
|
||||
type-aliases-package: com.example.sb_bt.domain
|
||||
type-aliases-package: com.sb.web.user.domain,com.sb.web.auth.domain
|
||||
mapper-locations: classpath:mapper/**/*.xml
|
||||
configuration:
|
||||
map-underscore-to-camel-case: true
|
||||
@@ -47,5 +58,6 @@ mybatis:
|
||||
logging:
|
||||
level:
|
||||
root: INFO
|
||||
com.example.sb_bt: DEBUG
|
||||
com.example.sb_bt.mapper: DEBUG
|
||||
com.sb.web: DEBUG
|
||||
com.sb.web.user.mapper: DEBUG
|
||||
com.sb.web.auth.mapper: DEBUG
|
||||
|
||||
Reference in New Issue
Block a user