application.yml 2 KB
spring:
  application:
    name: payment-service
  profiles:
    active: prod
  datasource:
    url: jdbc:postgresql://postgresql.ecommerce.svc.cluster.local:5432/ecommerce_payments
    username: ${DB_USERNAME:postgres}
    password: ${DB_PASSWORD:password}
    driver-class-name: org.postgresql.Driver
  jpa:
    hibernate:
      ddl-auto: validate
    properties:
      hibernate:
        dialect: org.hibernate.dialect.PostgreSQLDialect
        show_sql: false
        format_sql: true
        jdbc:
          lob:
            non_contextual_creation: true
  rabbitmq:
    host: rabbitmq.ecommerce.svc.cluster.local
    port: 5672
    username: ${RABBITMQ_USERNAME:guest}
    password: ${RABBITMQ_PASSWORD:guest}
    virtual-host: /
    connection-timeout: 5000

server:
  port: 8080
  servlet:
    context-path: /api

eureka:
  client:
    service-url:
      defaultZone: http://service-registry:8761/eureka/
    register-with-eureka: true
    fetch-registry: true

feign:
  client:
    config:
      default:
        connectTimeout: 5000
        readTimeout: 10000
        loggerLevel: basic
  circuitbreaker:
    enabled: true

# Stripe Configuration
stripe:
  secret-key: ${STRIPE_SECRET_KEY:sk_test_default}
  publishable-key: ${STRIPE_PUBLISHABLE_KEY:pk_test_default}
  webhook-secret: ${STRIPE_WEBHOOK_SECRET:whsec_default}

# PayPal Configuration
paypal:
  client-id: ${PAYPAL_CLIENT_ID:default-client-id}
  client-secret: ${PAYPAL_CLIENT_SECRET:default-client-secret}
  mode: ${PAYPAL_MODE:sandbox}

management:
  endpoints:
    web:
      exposure:
        include: health,info,metrics,prometheus
  endpoint:
    health:
      show-details: always
      show-components: always

logging:
  level:
    com.ecommerce.payment: INFO
    org.springframework.amqp: WARN
    org.hibernate.SQL: WARN
    feign: DEBUG
    com.stripe: WARN
  pattern:
    console: "%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n"

springdoc:
  api-docs:
    path: /v3/api-docs
  swagger-ui:
    path: /swagger-ui.html
    operations-sorter: method