kind: ConfigMap
apiVersion: v1
metadata:
  name: account
  namespace: bookstore-microservices
data:
  application.yaml: |-
    database: hsqldb

    spring:
      datasource:
        schema: "classpath:db/${database}/schema.sql"
        data: "classpath:db/${database}/data.sql"
        sql-script-encoding: UTF-8
      jpa:
        show-sql: false
        hibernate:
          ddl-auto: none
        open-in-view: false
      resources:
        chain:
          compressed: true
          cache: true
        cache:
          period: 86400

    security:
      oauth2:
        client:
          clientId: account
          clientSecret: account_secret
          accessTokenUri: http://${AUTH_HOST:security}:${AUTH_PORT:80}/oauth/token
          grant-type: client_credentials
          scope: SERVICE
        resource:
          userInfoUri: BUGFIX

    logging:
      pattern:
        console: "%clr(%d{HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:%5p}) %clr(-){faint} %clr([%t]){faint} %clr(%-40logger{39}){cyan}[%line]%clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:%wEx}"
      level:
        root: INFO

    server:
      port: ${PORT:80}
