Skip to content

Tiketeer/Tiketeer-BE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tiketeer BE

의존성

  • Java 21
  • Spring Boot 3

실행법

  • .env 추가

    DB_USERNAME= # DB Username
    DB_DATABASE= # DB database name
    DB_PASSWORD= # DB Password
  • application.yml 추가

    # src/main/resources/application.yml
    server:
      port: # Server Port
      servlet:
        context-path: "/api"
    
    spring:
      cache:
        type: redis
      profiles:
        active: "dev"
      datasource:
        driver-class-name: com.mysql.cj.jdbc.Driver
        url: # JDBC Connection URL
        username: ${DB_USERNAME}
        password: ${DB_PASSWORD}
      jpa:
        hibernate:
          ddl-auto: validate
        show-sql: true
        properties:
          hibernate:
            format_sql: true
            highlight_sql: true
            jdbc.batch_size: 300
            order_inserts: true
            order_updates: true
            generate_statistics: true
            session.events.log.LOG_QUERIES_SLOWER_THAN_MS: 300
      flyway:
        enabled: true
      mail:
        host: smtp.gmail.com
        port: 587
        username: ${EMAIL_ACCOUNT}
        password: ${EMAIL_PASSWORD}
        properties:
          mail:
            smtp:
              auth: true
              starttls:
                enable: true
                required: true
              connectiontimeout: 5000
              timeout: 5000
              writetimeout: 5000
            mime:
              charset: UTF-8
    data:
      redis:
        host: ${REDIS_HOST}
        port: ${REDIS_PORT}
        password: ${REDIS_PASSWORD}
      output:
        ansi:
          enabled: ALWAYS
    
    logging:
      level:
        org.hibernate.SQL: DEBUG
        org.hibernate.SQL_SLOW: INFO
        org.hibernate.orm.jdbc.bind: TRACE
        org.hibernate.stat: TRACE
    
    jwt:
          secret-key: ${SECRET_KEY}
          access-key-expiration-s: ${ACCESS_KEY_EXPIRATION_SECONDS}
          refresh-key-expiration-s: ${REFRESH_KEY_EXPIRATION_SECONDS}
    
    custom:
      service:
        baseUrl: ${BASE_URL}
      policy:
        ticket-concurrency: p-lock | o-lock | d-lock
        storage: local
        local-storage-path: files
    
    storage:
      aws:
        s3:
          active: true
    thread:
      pool:
        core-pool-size: 
        queue-capacity: 
        max-pool-size: 
  • 도커 컴포즈

    docker-compose -f docker-compose.dev.yml -d up
    
  • 서버 실행

    ./gradlew bootrun
  • 유닛 테스트

    ./gradlew clean test
  • 부하 테스트

    docker-compose -f ./stress-test/docker-compose.stress.yml up -d
  • 서버 실행 (with Docker)

      docker-compose -f ./docker-compose.prod.yml up -d
    
    • 선행 조건
      • application.yml 파일이 Docker 컨텍스트에 맞게 작성되어 있을 것

API

  • 서버 실행 후 스웨거를 통해 확인 가능
  • /api/swagger-ui/index.html

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •