# ============================================================
# Spring Batch Java Benchmark — Application Configuration
# ============================================================

# === Data source (benchmark PostgreSQL) ===
spring.datasource.url=jdbc:postgresql://localhost:5432/benchmark
spring.datasource.username=postgres
spring.datasource.password=postgres
spring.datasource.driver-class-name=org.postgresql.Driver

# === HikariCP — same pool size as Rust benchmark (10) ===
spring.datasource.hikari.maximum-pool-size=10
spring.datasource.hikari.minimum-idle=2
spring.datasource.hikari.connection-timeout=30000

# === Virtual threads (Java 25 + Spring Boot 4.x) ===
# Java 24+ strongly recommended for best experience (Spring Boot docs)
spring.threads.virtual.enabled=true

# === Spring Batch metadata (separate H2 in-memory DB) ===
# Keeps benchmark DB clean — batch job tables go to H2
spring.batch.job.enabled=false
spring.batch.jdbc.initialize-schema=always

# === JPA — DDL handled by schema.sql ===
spring.jpa.hibernate.ddl-auto=none
spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect

# === Schema initialisation — creates transactions table ===
spring.sql.init.mode=always
spring.sql.init.schema-locations=classpath:schema.sql

# === Logging (minimal for benchmark — reduce noise) ===
logging.level.root=WARN
logging.level.org.springframework.batch=INFO
logging.level.com.example.benchmark=INFO
