프로젝트 세팅

DB 사용 방식

Create DB

sql

CREATE DATABASE moayo
  DEFAULT CHARACTER SET utf8mb4
  COLLATE utf8mb4_general_ci;

IntelliJ Run Configuration

application.yml

spring:
  application:
    name: "moayo-backend" 

  datasource:
    driver-class-name: com.mysql.cj.jdbc.Driver 
    url: ${DB_URL} 
    username: ${DB_USER} 
    password: ${DB_PW} 

  jpa:
    database: mysql 
    database-platform: org.hibernate.dialect.MySQLDialect
    show-sql: true 
    hibernate:
      ddl-auto: update 
    properties:
      hibernate:
        format_sql: true