<%#
 Copyright 2013-2025 the original author or authors from the JHipster project.

 This file is part of the JHipster project, see https://www.jhipster.tech/
 for more information.

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

      https://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-%>
# ===================================================================
# 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
# ===================================================================

<%_ if (databaseTypeNeo4j && !databaseMigrationLiquibase) { _%>
org:
  neo4j:
    migrations:
      locations-to-scan:
      packages-to-scan: <%= packageName %>.config.neo4j
      installed-by: <%= baseName %>

<%_ } _%>
<%_ if (serviceDiscoveryEureka) { _%>
eureka:
  client:
    enabled: false
  instance:
    appname: <%= baseName %>
    instanceId: <%= baseName %>:${spring.application.instance-id:${random.value}}
<%_ } _%>

<%_ if (databaseTypeMongodb) { _%>
mongock:
  migration-scan-package:
    - <%= packageName %>.config.dbmigrations
  mongo-db:
    read-concern: local
    write-concern:
      journal: false
      w: "majority"

<%_ } _%>
spring:
  application:
    name: <%= baseName %>
<%_ if (applicationTypeGateway) { _%>
  autoconfigure:
    exclude:
      - org.springframework.cloud.gateway.config.GatewayMetricsAutoConfiguration
<%_ } _%>
<%_ if (serviceDiscoveryEureka || serviceDiscoveryConsul || messageBrokerAny) { _%>
  cloud:
<%_ } _%>
<%_ if (serviceDiscoveryEureka) { _%>
    config:
      enabled: false
<%_ } _%>
<%_ if (serviceDiscoveryConsul) { _%>
    consul:
      discovery:
        enabled: false
        instanceId: ${spring.application.name}:${spring.application.instance-id:${random.value}}
      config:
        enabled: false
      enabled: false
<%_ } _%>
<%_ if (messageBrokerKafka) { _%>
    function:
      definition: kafkaConsumer;kafkaProducer
    stream:
      kafka:
        binder:
          replicationFactor: 1
          auto-create-topics: true
      bindings:
        binding-out-0:
          content-type: text/plain
          group: <%= dasherizedBaseName %>
        kafkaConsumer-in-0:
          destination: sse-topic
          content-type: text/plain
          group: <%= dasherizedBaseName %>
        kafkaProducer-out-0:
          content-type: text/plain
          group: <%= dasherizedBaseName %>
<%_ } _%>
<%_ if (messageBrokerPulsar) { _%>
    function:
      definition: testStringSupplier;testStringConsumer
    stream:
      bindings:
        testStringSupplier-out-0:
          destination: <%= dasherizedBaseName %>
        testStringConsumer-in-0:
          destination: <%= dasherizedBaseName %>
<%_ } _%>
<%_ if (databaseMigrationLiquibase) { _%>
  # Replace by 'prod, faker' to add the faker context and have sample data loaded in production
  liquibase:
    contexts: test
<%_ } _%>
  jackson:
    serialization:
      write-durations-as-timestamps: false
<%_ if (databaseTypeCassandra) { _%>
  cassandra:
    compression: NONE
<%_ } _%>
  mail:
    host: localhost
  main:
    allow-bean-definition-overriding: true
  messages:
    basename: i18n/messages
<%_ if (generateInMemoryUserCredentials || authenticationTypeOauth2 || authenticationTypeJwt) { _%>
  security:
  <%_ if (generateInMemoryUserCredentials) { _%>
    user:
      name: test
      password: test
      roles:
        - USER
  <%_ } _%>
  <%_ if (authenticationTypeOauth2) { _%>
    oauth2:
      client:
        provider:
          oidc:
            issuer-uri: http://DO_NOT_CALL:9080/realms/jhipster
      resourceserver:
        jwt:
          principal-claim-name: preferred_username
  <%_ } _%>
  <%_ if (authenticationTypeJwt) { _%>
    oauth2:
      resourceserver:
        jwt:
          authority-prefix: ''
          authorities-claim-name: auth
  <%_ } _%>
<%_ } _%>
  task:
    execution:
      thread-name-prefix: <%= dasherizedBaseName %>-task-
      pool:
        core-size: 1
        max-size: 50
        queue-capacity: 10000
    scheduling:
      thread-name-prefix: <%= dasherizedBaseName %>-scheduling-
      pool:
        size: 20
  thymeleaf:
    mode: HTML

server:
  port: 10344
  address: localhost

# ===================================================================
# JHipster specific properties
#
# Full reference is available at: https://www.jhipster.tech/common-application-properties/
# ===================================================================
jhipster:
  clientApp:
    name: "<%= frontendAppName %>"
  mail:
    from: <%= baseName %>@localhost.com
    base-url: http://127.0.0.1:8080
  logging:
    # To test json console appender
    use-json-format: false
    logstash:
      enabled: false
      host: localhost
      port: 5000
      ring-buffer-size: 512
<%_ if (authenticationTypeJwt) { _%>
  security:
    authentication:
      jwt:
        # This token must be encoded using Base64 (you can type `echo 'secret-key'|base64` on your command line)
        base64-secret: <%= jwtSecretKey %>
        # Token is valid 24 hours
        token-validity-in-seconds: 86400
        token-validity-in-seconds-for-remember-me: 86400
<%_ } _%>
<%_ if (authenticationTypeSession && !reactive) { _%>
  security:
    remember-me:
      # security key (this key should be unique for your application, and kept secret)
      key: <%= rememberMeKey %>
<%_ } _%>

# ===================================================================
# 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:
management:
  health:
    mail:
      enabled: false
<%_ if (workflow === 'flowable') { _%>
flowable:
  font-name: 宋体
  database-schema-update: true
<%_ } _%>
