Loading...

프로젝트/에브리타임 / / 2022. 4. 21. 23:31

[프로젝트] 팀원과 다른 DB 사용할 때 체크해야 할 코드

반응형

build.gradle

 

mariaDB

dependencies {
	implementation 'org.springframework.boot:spring-boot-starter-mail'
	implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
	implementation 'org.springframework.boot:spring-boot-starter-mustache'
	implementation 'org.springframework.boot:spring-boot-starter-validation'
	implementation 'org.springframework.boot:spring-boot-starter-web'
	compileOnly 'org.projectlombok:lombok'
	developmentOnly 'org.springframework.boot:spring-boot-devtools'
	runtimeOnly 'org.mariadb.jdbc:mariadb-java-client'
	annotationProcessor 'org.projectlombok:lombok'
	testImplementation 'org.springframework.boot:spring-boot-starter-test'
}

MySQL

dependencies {
	implementation 'org.springframework.boot:spring-boot-starter-mail'
	implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
	implementation 'org.springframework.boot:spring-boot-starter-mustache'
	implementation 'org.springframework.boot:spring-boot-starter-validation'
	implementation 'org.springframework.boot:spring-boot-starter-web'
	compileOnly 'org.projectlombok:lombok'
	developmentOnly 'org.springframework.boot:spring-boot-devtools'
	runtimeOnly 'mysql:mysql-connector-java'
	annotationProcessor 'org.projectlombok:lombok'
	testImplementation 'org.springframework.boot:spring-boot-starter-test'
}

 

 

application.yml

 

mariaDB

spring:
  datasource:
      url: jdbc:mariadb://localhost:3306/everytime
      driver-class-name: org.mariadb.jdbc.Driver
      username: green
      password: green1234

MySQL

spring:
  datasource:
      url: jdbc:mysql://localhost:3306/everytime
      driver-class-name: com.mysql.cj.jdbc.Driver
      username: green
      password: green1234
반응형