spring.profiles.active=@activatedProperties@

#Server
server.port=9290
server.error.include-message=always

server.compression.enabled=true
# A lista separada por vírgulas de tipos MIME que devem ser compactados
server.compression.mime-types=text/html,text/xml,text/plain,text/css,text/javascript,application/javascript,application/json
# Compacte a resposta apenas se o tamanho da resposta for de pelo menos 4 KB
server.compression.min-response-size=8192

#server.use-forward-headers=true
server.forward-headers-strategy=native

# LOGSTASH CONFIG
logstash.enabled=true
logstash.host=189.126.111.35
logstash.port=5000
logstash.tcp.enabled=true

# Logging (Logback)
logging.config=/opt/sgscntt-dev/config/logback.xml
logging.file.name=sigescantt.log
logging.file.path=/opt/sgscntt-dev/logs
logging.level.br.gov=DEBUG
logging.level.org.springframework.security=INFO
#logging.level.org.springframework.web=DEBUG
logging.level.org.hibernate=INFO

# Max Memory Size
spring.codec.max-in-memory-size=12MB

## Jackson Serialization
spring.jackson.default-property-inclusion=NON_NULL
spring.jackson.serialization.fail-on-empty-beans=false
spring.jackson.deserialization.fail-on-unknown-properties=false

#Database Configuration
spring.datasource.url=jdbc:postgresql://localhost/sigescantt
spring.datasource.username=postgres
spring.datasource.password=postgre@2o24

# JPA
spring.data.jpa.repositories.bootstrap-mode=default

spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect
spring.jpa.hibernate.ddl-auto=none
spring.jpa.open-in-view=false
spring.jpa.properties.hibernate.format_sql=false
spring.jpa.properties.hibernate.generate_statistics=false
spring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults = false
spring.jpa.properties.hibernate.jdbc.batch_size=25
spring.jpa.properties.hibernate.order_inserts=true
spring.jpa.properties.hibernate.order_updates=true
spring.jpa.properties.hibernate.jdbc.batch_versioned_data = true

spring.jpa.properties.hibernate.search.backend.analysis.configurer=br.com.oti.gesconsys.spring.LuceneBrazilianConfig
spring.jpa.properties.hibernate.search.backend.directory.type = local-filesystem
spring.jpa.properties.hibernate.search.backend.directory.root = /opt/sgscntt-dev/data/idx
spring.jpa.properties.hibernate.search.backend.lucene_version = LUCENE_9_8_0
spring.jpa.show-sql=false

#Liquibase
spring.liquibase.change-log=classpath:liquibase/base-changelog.xml

#Desligando batches
spring.batch.jdbc.initialize-schema=always
spring.batch.job.enabled=false

#Servlets
spring.servlet.multipart.max-file-size=350MB
spring.servlet.multipart.max-request-size=350MB

#JWT secret
jwt.secret= 2c5b0f52e10254af6c22a16ad5c32703fe0813e8610ef1e3801a1fdcfbc28878f20b41ea055a18a4454286f74adeb17baa070a5e4197665ae0ad4aab99ab6e9ea4c0e7b3e17b04a7daa8493becff03013d63fa3986298fe51e2261dd86b2bbfc88983ae9ead82da8caf1daf679f0ef7a7e44ee1a1f85e55ca3c69477ffc12d4443404f8ecee52e7865a3eb62b556e9e57b937c1690e02830002a4054eccc8cb87e12a1a7973bb5e9304ce472244cdc2dd93ec56c856ee13597ab1631551dd4f55e32fcd772407fc19903d1bf5d29cf50153e1fc5f992e96fc081befdc1779c5d26023ec6d967e326982b21ad9b5b4dd9b45798b88703c34aadc679a7adcf9e6d
jwt.access.expiration=${JWT_ACCESS_EXPIRATION:10h}
jwt.refresh.expiration=${JWT_REFRESH_EXPIRATION:48h}


# KeyCloak Admin Client
keycloak.default-password=${KEYCLOAK_DEFAULT_PASSWORD:sigescantt}
keycloak.realm=${KEYCLOAK_REALM:master}
keycloak.server-url=${KEYCLOAK_SERVER_URL:http://127.0.0.1:8180}
keycloak.server-realm-url=${keycloak.server-url}/realms/${keycloak.realm}
keycloak.admin-client.id=${KEYCLOAK_CLIENT_ID:sigescantt-dev}
keycloak.admin-client.secret=${KEYCLOAK_CLIENT_SECRET:RkoH6ckiFuXJ72CIVZiPDzCHU9rOSLlY}

# KeyCloak Resource server
spring.security.oauth2.resourceserver.jwt.issuer-uri=${keycloak.server-realm-url}
spring.security.oauth2.resourceserver.jwt.jwk-set-uri=${spring.security.oauth2.resourceserver.jwt.issuer-uri}/protocol/openid-connect/certs

# KeyCloak Client
spring.security.oauth2.client.provider.keycloak.issuer-uri=${spring.security.oauth2.resourceserver.jwt.issuer-uri}
spring.security.oauth2.client.provider.keycloak.jwk-set-uri=${spring.security.oauth2.resourceserver.jwt.issuer-uri}/protocol/openid-connect/certs
spring.security.oauth2.client.registration.keycloak-login-client.provider=keycloak
spring.security.oauth2.client.registration.keycloak-login-client.client-id=${keycloak.admin-client.id}
spring.security.oauth2.client.registration.keycloak-login-client.client-secret=${keycloak.admin-client.secret}
spring.security.oauth2.client.registration.keycloak-login-client.authorization-grant-type=password
spring.security.oauth2.client.registration.keycloak-login-client.scope=openid,profile,email


sigescantt.api-key.scheduler=${SCHEDULER_API_KEY:scheduler-api-key-dev-12345}
sigescantt.volume.internal=/opt/sgscntt-dev/repo

sir.sdk.service.url=${SIR_SERVICE_URL:http://antt.gov.br/sir/IConcessionariaService}
