Skip to content

N0T-BAD/BE-purchase

Repository files navigation

BE-purchase

구매 서비스 입니다.

환경 변수

environment description
{DB_MASTER_URL} MY SQL MASTER DB URL을 입력해주세요
{DB_SLAVE_URL} MY SQL SLAVE DB URL을 입력해주세요
{DB_USERNAME} MY SQL DB USERNAME을 입력해주세요
{DB_PASSWORD} MY SQL DB PASSWORD를 입력해주세요
{EUREKA_DEFAULT_ZONE} EUREKA DEFAULT ZONE을 입력해주세요
{KAFKA_BOOTSTRAP_ADDRESS} Kafka bootstrap 주소를 입력해주세요
{DOCKERHUB_USERNAME} DOCKERHUB 명을 입력해주세요
{DOCKERHUB_PASSWORD} DOCKERHUB 비밀번호를 입력해주세요
{VM_INSTANCE_HOST} VM 인스턴스 Host를 입력해주세요
{SSH_USERNAME} SSH USERNAME을 입력해주세요
{SSH_PRIVATE_KEY} SSH PRIVATE KEY를 입력해주세요
  • 환경 변수를 바탕으로 application.yml 파일을 생성합니다.
server:
  port: 8081

eureka:
  client:
    register-with-eureka: true
    fetch-registry: true
    service-url:
      defaultZone: ${ eureka.client.service-url.defaultZone }

spring:
  application:
    name: purchase-service

  datasource:
    master:
      driver-class-name: com.mysql.cj.jdbc.Driver
      jdbc-url: ${spring.datasource.master.jdbc-url}
      username: ${spring.datasource.master.username}
      password: ${spring.datasource.master.password}

    slave:
      driver-class-name: com.mysql.cj.jdbc.Driver
      jdbc-url: ${spring.datasource.slave.jdbc-url}
      username: ${spring.datasource.slave.username}
      password: ${spring.datasource.slave.password}

  jpa:
    properties:
      hibernate:
        dialect: org.hibernate.dialect.MySQL8Dialect
        format_sql: true
    hibernate:
      ddl-auto: update
    show-sql: true

  kafka:
    bootstrapAddress: ${spring.kafka.bootstrapAddress}
    topicName: viewCount

block:
  service:
    api:
      content-type: application/json

member:
  service:
    api:
      content-type: application/json

logging:
  level:
    root: info
    com.blockpage.purchaseservice.adaptor.infrastructure.message: debug
  • 위의 과정을 마치고 프로그램을 실행합니다.


About

구매 서비스 입니다.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •