# Application Settings
spring.application.name=cordys-crm
server.port=8081

# Compression Settings (gzip)
server.compression.enabled=true
server.compression.mime-types=application/json,application/xml,text/html,text/xml,text/plain,application/javascript,text/css,text/javascript,image/jpeg
server.compression.min-response-size=2048

# Logging Settings
logging.file.path=/opt/cordys/logs/cordys-crm

# DataSource Configuration (HikariCP)
spring.datasource.type=com.zaxxer.hikari.HikariDataSource
spring.datasource.hikari.maximum-pool-size=100
spring.datasource.hikari.minimum-idle=10
spring.datasource.hikari.idle-timeout=300000
spring.datasource.hikari.auto-commit=true
spring.datasource.hikari.pool-name=DatebookHikariCP
spring.datasource.hikari.max-lifetime=1800000
spring.datasource.hikari.connection-timeout=30000
spring.datasource.hikari.connection-test-query=SELECT 1

# Quartz Scheduler DataSource Settings
quartz.enabled=true
quartz.scheduler-name=cordys-crm-quartz
quartz.thread-count=10
quartz.properties.org.quartz.jobStore.acquireTriggersWithinLock=true

spring.datasource.quartz.url=${spring.datasource.url}
spring.datasource.quartz.username=${spring.datasource.username}
spring.datasource.quartz.password=${spring.datasource.password}
spring.datasource.quartz.hikari.maximum-pool-size=50
spring.datasource.quartz.hikari.minimum-idle=10
spring.datasource.quartz.hikari.idle-timeout=300000
spring.datasource.quartz.hikari.auto-commit=true
spring.datasource.quartz.hikari.pool-name=DatebookHikariCP
spring.datasource.quartz.hikari.max-lifetime=1800000
spring.datasource.quartz.hikari.connection-timeout=30000
spring.datasource.quartz.hikari.connection-test-query=SELECT 1

# MyBatis Configuration
mybatis.configuration.cache-enabled=false
mybatis.configuration.lazy-loading-enabled=false
mybatis.configuration.aggressive-lazy-loading=true
mybatis.configuration.use-column-label=true
mybatis.configuration.auto-mapping-behavior=full
mybatis.configuration.default-statement-timeout=25000
mybatis.configuration.map-underscore-to-camel-case=true

# Virtual Thread Settings (for Thread Management)
spring.threads.virtual.enabled=true
spring.mvc.log-request-details=false

# Flyway Database Migration Configuration
spring.flyway.enabled=true
spring.flyway.baseline-on-migrate=true
spring.flyway.locations=classpath:migration
spring.flyway.table=cordys_crm_version
spring.flyway.baseline-version=0
spring.flyway.encoding=UTF-8
spring.flyway.validate-on-migrate=false

# File Upload Configuration
spring.servlet.multipart.max-file-size=1024MB
spring.servlet.multipart.max-request-size=1024MB

# Redisson (Session Management with Redis)
spring.session.timeout=43200s
spring.session.redis.repository-type=indexed
spring.cache.type=redis

#spring.redis.redisson.file=file:/opt/cordys/conf/redisson.yml

# Template Engines (Freemarker, Groovy)
spring.freemarker.check-template-location=false
spring.groovy.template.check-template-location=false

# Swagger Configuration (API Documentation)
springdoc.swagger-ui.enabled=true
springdoc.api-docs.enabled=true
springdoc.api-docs.groups.enabled=true

# i18n
spring.messages.basename=i18n/cordys-crm

# Enable whitelist functionality, if not enabled, access will not be restricted.
allowed.ip.ranges.enabled=false
# Enable whitelist functionality, if not enabled, access will not be restricted.
allowed.ip.ranges=

# List of URLs that require XSS filtering, supports Ant-style path matching, e.g., /api/**. If no URLs need to be filtered, it can be left empty.
# xss.protection.url.list=/account/follow/**,/announcement/add