Giter Site home page Giter Site logo

simple_is_the_best's Introduction

1. 개발환경

  • Kotlin
  • JDK 17
  • Gradle (Multi Module)
  • JPA, MySQL
  • Spring Boot 2.7.5

2. 설치 및 실행 방법

다운로드

  • Github에 업로드된 프로젝트를 clone 받기 위해 git이 자신의 local에 설치되어 있어야 합니다.
$ git clone https://github.com/softpeanut/dangpa_ass.git

빌드

  • Gradle이 자신의 local에 미리 설치되어 있어야 합니다.
$ ./gradlew build

실행

  • 아래의 명령어를 실행하기 전에 MySQL Database를 자신의 local에 미리 실행시키고 CREATE DATABASE igloomall SQL문을 통해 스키마를 생성합니다.
  • application.yml 파일에서 MYSQL_USERNAMEMYSQL_PASSWORD, DB_PORT를 자신의 Database에 맞게 수정해야 합니다.
$ ./gradlew bootRun

실행 확인

  • 자신의 브라우저에 http://localhost:8080을 입력하여 Welcom to Igloo Mall이라는 문구 보이는지 확인합니다.

3. ERD

ERD는 erd cloud 툴을 활용하여 제작하였습니다.

img.png

기본키 구성

  • tbl_coupon, tbl_user의 PK -> Auto Increment
  • tbl_coupon_history의 PK -> tbl_coupontbl_user의 PK를 복합키로 구성

연관 관계

  • tbl_coupon - tbl_coupon_history => 1 to N
  • tbl_user - tbl_coupon_history => 1 to N

제약 조건

  • tbl_coupon의 code(column) -> unique 제약조건

4. API 명세서

API 명세서는 이곳에서 확인할 수 있습니다.

  • Postman을 활용하여 가독성이 좋고, 쉽게 테스트할 수 있는 환경이 마련되어 있습니다.
  • Example Request 부분에서 SUCCESS 케이스 외에 FAILED 케이스 또한 확인할 수 있습니다.
  • curl 명령어를 비롯하여 다양한 언어로 직접 요청을 보내 확인할 수 있습니다. (서버를 실행해야 요청이 가능합니다 😃)

5. Trouble Shooting

과제를 진행하며 마주한 문제들에 대해 기록합니다.

Flyway 사용 시 빌드가 안 되는 이슈

  • 먼저, Flyway를 사용하기 위해 infrastructure module의 build.gradleorg.flywaydb:flyway-core 의존성을 추가하였습니다.
  • 하지만 Unsupported Database: MySQL 8.0 오류 메시지와 함께 빌드가 실패하였습니다.

현재 데이터베이스로 MySQL을 사용하고 있습니다. Flyway를 사용해 DB Migration을 진행하기 위해서 해당 데이터베이스와 관련된 의존성이 추가로 필요하였습니다.

➡️ 따라서 org.flywaydb:flyway-core가 내장되어 있는 org.flywaydb:flyway-mysql으로 변경하여 해결하였습니다.

simple_is_the_best's People

Contributors

softpeanut avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.