# ===================================================================
# Spring Boot configuration.
#
# This configuration is used for unit/integration tests.
#
# More information on profiles: https://www.jhipster.tech/profiles/
# More information on configuration properties: https://www.jhipster.tech/common-application-properties/
# ===================================================================

# ===================================================================
# Standard Spring Boot properties.
# Full reference is available at:
# http://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html
# ===================================================================

spring:
  profiles:
  # Uncomment the following line to enable tests against production database type rather than H2, using Testcontainers
  #active: testcontainers
  application:
    name: gitsearch
  datasource:
    type: com.zaxxer.hikari.HikariDataSource
    url: jdbc:h2:mem:gitsearch;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
    name:
    username:
    password:
    hikari:
      auto-commit: false
  jackson:
    serialization:
      write-durations-as-timestamps: false
  jpa:
    database-platform: io.github.jhipster.domain.util.FixedH2Dialect
    open-in-view: false
    show-sql: false
    hibernate:
      ddl-auto: none
      naming:
        physical-strategy: org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy
        implicit-strategy: org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy
    properties:
      hibernate.id.new_generator_mappings: true
      hibernate.connection.provider_disables_autocommit: true
      hibernate.cache.use_second_level_cache: false
      hibernate.cache.use_query_cache: false
      hibernate.generate_statistics: false
      hibernate.hbm2ddl.auto: validate
      hibernate.jdbc.time_zone: UTC
  data:
    elasticsearch:
      properties:
        path:
          home: target/elasticsearch
  elasticsearch:
    rest:
      uris: http://localhost:29200
  liquibase:
    contexts: test
  mail:
    host: localhost
  main:
    allow-bean-definition-overriding: true
  messages:
    basename: i18n/messages
  task:
    execution:
      thread-name-prefix: gitsearch-task-
      pool:
        core-size: 1
        max-size: 50
        queue-capacity: 10000
    scheduling:
      thread-name-prefix: gitsearch-scheduling-
      pool:
        size: 1
  thymeleaf:
    mode: HTML
  security:
    oauth2:
      client:
        provider:
          gitlabOidc:
            issuer-uri: https://sharing.codeability-austria.uibk.ac.at
        registration:
          gitlabOidc:
            client-id: 149276ac11138d9ba72fb3cd12815e3fa2f372866df0eac0f7d1aae5fdffea24
            client-secret: 6f480635241f420a361581f4837594ea6f48f5ee6f515c1aa89f325dd922dbb0

server:
  port: 10344
  address: localhost

# ===================================================================
# JHipster specific properties
#
# Full reference is available at: https://www.jhipster.tech/common-application-properties/
# ===================================================================

jhipster:
  clientApp:
    name: 'gitSearchV2App'
  logging:
    # To test json console appender
    use-json-format: false
    logstash:
      enabled: false
      host: localhost
      port: 5000
      queue-size: 512
  mail:
    from: test@localhost
    base-url: http://127.0.0.1:8080
  security:
    oauth2:
      # TODO: audience seems not really relevant, could be omitted? It is identical with client-id above
      audience:
        - 149276ac11138d9ba72fb3cd12815e3fa2f372866df0eac0f7d1aae5fdffea24
    authentication:
      jwt:
        # This token must be encoded using Base64 (you can type `echo 'secret-key'|base64` on your command line)
        base64-secret: ZTY3OGIwZWZhMzdhYTQ2NjAwNTdlNDQ2NWM4YjQyMzlhMWVkMTJlYTExYzMwMzBjOWIzM2E1OTRmZWZkZmYzYzZhNWQ5N2EzZjMyNTFkMjM0ZjNmOWRhYTYzNGEzZDE3NThkYTNmZGVmNTQ1MmRlZjg1YWY4NTU4OGVmNDBkZDI=
        # Token is valid 24 hours
        token-validity-in-seconds: 86400
  metrics:
    logs: # Reports metrics in the logs
      enabled: true
      report-frequency: 60 # in seconds

# ===================================================================
# Application specific properties
# Add your own application properties here, see the ApplicationProperties class
# to have type-safe configuration, like in the JHipsterProperties above
#
# More documentation is available at:
# https://www.jhipster.tech/common-application-properties/
# ===================================================================

# application:
application:
  search:
    highlight-pre: <mark><strong>
    highlight-post: </strong></mark>
  gitlab:
    url: https://sharing.codeability-austria.uibk.ac.at/
    generalAccessToken: zPxPmJE3UXAZJpBzxqej
  registeredPlugins:
    - 'http://localhost:8081/api/sharing/config' # may not be reachable for testing!
    - 'http://localhost:8082/api/sharingPluginConfig' # may not be reachable for testing!