103 lines
2.6 KiB
YAML
103 lines
2.6 KiB
YAML
spring:
|
|
application:
|
|
name: snp-batch
|
|
|
|
# PostgreSQL Database Configuration
|
|
datasource:
|
|
url: jdbc:postgresql://10.187.58.58:5432/mdadb?currentSchema=snp_data
|
|
username: mda
|
|
password: mda#8932
|
|
driver-class-name: org.postgresql.Driver
|
|
hikari:
|
|
maximum-pool-size: 10
|
|
minimum-idle: 5
|
|
connection-timeout: 30000
|
|
|
|
# JPA Configuration
|
|
jpa:
|
|
hibernate:
|
|
ddl-auto: update
|
|
show-sql: true
|
|
properties:
|
|
hibernate:
|
|
dialect: org.hibernate.dialect.PostgreSQLDialect
|
|
format_sql: true
|
|
default_schema: snp_data
|
|
|
|
# Batch Configuration
|
|
batch:
|
|
jdbc:
|
|
table-prefix: "snp_data.batch_"
|
|
initialize-schema: always # Changed to 'never' as tables already exist
|
|
job:
|
|
enabled: false # Prevent auto-run on startup
|
|
|
|
# Thymeleaf Configuration
|
|
thymeleaf:
|
|
cache: false
|
|
prefix: classpath:/templates/
|
|
suffix: .html
|
|
|
|
# Quartz Scheduler Configuration - Using JDBC Store for persistence
|
|
quartz:
|
|
job-store-type: jdbc # JDBC store for schedule persistence
|
|
jdbc:
|
|
initialize-schema: never # Create Quartz tables if not exist
|
|
properties:
|
|
org.quartz.scheduler.instanceName: SNPBatchScheduler
|
|
org.quartz.scheduler.instanceId: AUTO
|
|
org.quartz.threadPool.threadCount: 10
|
|
org.quartz.jobStore.class: org.quartz.impl.jdbcjobstore.JobStoreTX
|
|
org.quartz.jobStore.driverDelegateClass: org.quartz.impl.jdbcjobstore.PostgreSQLDelegate
|
|
org.quartz.jobStore.tablePrefix: snp_data.QRTZ_
|
|
org.quartz.jobStore.isClustered: false
|
|
org.quartz.jobStore.misfireThreshold: 60000
|
|
|
|
# Server Configuration
|
|
server:
|
|
port: 8041
|
|
servlet:
|
|
context-path: /
|
|
|
|
# Actuator Configuration
|
|
management:
|
|
endpoints:
|
|
web:
|
|
exposure:
|
|
include: health,info,metrics,prometheus,batch
|
|
endpoint:
|
|
health:
|
|
show-details: always
|
|
|
|
# Logging Configuration
|
|
logging:
|
|
level:
|
|
root: INFO
|
|
com.snp.batch: DEBUG
|
|
org.springframework.batch: DEBUG
|
|
org.springframework.jdbc: DEBUG
|
|
pattern:
|
|
console: "%d{yyyy-MM-dd HH:mm:ss} - %msg%n"
|
|
file: "%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n"
|
|
file:
|
|
name: logs/snp-batch.log
|
|
|
|
# Custom Application Properties
|
|
app:
|
|
batch:
|
|
chunk-size: 1000
|
|
api:
|
|
url: https://api.example.com/data
|
|
timeout: 30000
|
|
ship-api:
|
|
url: http://10.29.16.219:18030/shipsapi
|
|
username: 7cc0517d-5ed6-452e-a06f-5bbfd6ab6ade
|
|
password: 2LLzSJNqtxWVD8zC
|
|
ais-api:
|
|
url: http://10.29.16.219:18030/aisapi
|
|
webservice-api:
|
|
url: http://10.29.16.219:18030/webservices
|
|
schedule:
|
|
enabled: true
|
|
cron: "0 0 * * * ?" # Every hour
|