Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BE] 로컬에서 어플리케이션이 동작하게 한다. #1046

Open
nayonsoso opened this issue Jan 11, 2025 · 0 comments · May be fixed by #1047
Open

[BE] 로컬에서 어플리케이션이 동작하게 한다. #1046

nayonsoso opened this issue Jan 11, 2025 · 0 comments · May be fixed by #1047

Comments

@nayonsoso
Copy link
Contributor

nayonsoso commented Jan 11, 2025

🔍 설명

1/ 로컬에서 mysql 쓰도록 application.yml 을 아래와 같이 변경

# IS-AS
  datasource:
    url: jdbc:h2:mem:test
    username: sa
    password:
  h2:
    console:
      enabled: true
      path: /h2-console
# TO-BE
  datasource:  
    driver-class-name: com.mysql.cj.jdbc.Driver  
    url: jdbc:mysql://localhost/review_me?createDatabaseIfNotExist=true&&rewriteBatchedStatements=true&serverTimezone=Asia/Seoul&characterEncoding=UTF-8  
    username: {모든 팀원들 컴퓨터에서 같은 이름의 어떤 유저 만들고 권한을 준 다음, 그 유저 이름 사용}  
    password: {그 유저 비밀번호 사용}

2/ build.gradle에 아래 내용 추가

def activeProfile = def activeProfile = project.findProperty("profile") ?: 'local'

dependencies {
    if (activeProfile == 'local') {
        implementation 'com.h2database:h2'
    } else {
        testImplementation 'com.h2database:h2'
    }
}

🔥 할 일

  • 의견을 모으고, PR을 만든다.

⏰ 예상 시간

  • 5분
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant