server:
  port: 9091
  servlet:
    context-path: /

file:
  upload-dir: ./uploads/documents
  shared-dir: ./uploads/shared

image-dir: ./images

spring:
  application:
    name: egl_passationdesmarches
    mail:
      sent:
        from: alainbakole55@gmail.com
  mvc:
    pathmatch:
      matching-strategy: ant_path_matcher
  jackson:
    property-naming-strategy: SNAKE_CASE
  flyway:
    locations: classpath:/db/migration
    schemas: egl_pm_db
    baselineOnMigrate: true
    enabled: true
  datasource:
    driver-class-name: org.postgresql.Driver
    url: jdbc:postgresql://localhost:5432/egl_pm_db
    username: postgres
    password: root
  jpa:
    properties:
      hibernate:
        dialect: org.hibernate.dialect.PostgreSQLDialect
        ddl-auto: create
        jdbc:
          lob:
            non_contextual_creation: true
    generate-ddl: true
    show-sql: true
  # Security Configuration
  servlet:
    multipart:
      enabled: true
      max-file-size: 500MB
      max-request-size: 500MB
  security:
    oauth2:
      resourceserver:
        jwt:
          issuer-uri: http://localhost:8080/realms/EGL_PM
          jwk-set-uri: ${spring.security.oauth2.resourceserver.jwt.issuer-uri}/protocol/openid-connect/certs
  mail:
    host: sandbox.smtp.mailtrap.io
    port: 587
    username: 7b2cad371993df
    password: 0be65dd54a8c7e
    properties:
      mail:
        smtp:
          auth: true
          starttls:
            enable: true
    test-connection: true

  rabbitmq:
    host: localhost
    port: 5672
    username: admin
    password: R#7v9E63b9
#  mail:
#    host: smtp.gmail.com
#    port: 587
#    username: alainbakole55@gmail.com
#    password: lizl ifde yzks kvzk
  # JWT Configuration
rabbitmq:
  queue:
    email:
      name: email_queue
  exchange:
    email:
      name: email_exchange
  binding:
    email:
      name: email_routing_key

jwt:
  auth:
    converter:
      resource-id: egl_pm
      principal-attribute: principal_username

  # Logging Configuration
logging:
  level:
    org:
      springframework:
        security: DEBUG

springdoc:
  enable-native-support: true
  api-docs:
    enabled: true
  swagger-ui:
    enabled: true
    path: /swagger-ui.html
    config-url: /v3/api-docs/swagger-config

#keycloak:
#  server-url: localhost:8080
#  realm: EGL_PM
#  admin-client-id: admin-cli
#  admin-client-secret: 1cKv06u4zxcNGiGxaZ4V1Qt5DvJuscds
#  client: egl_pm
#  urls:
#    auth: http://${keycloak.server-url}