Skip to content

Commit 9f877e9

Browse files
committed
ci/cd: 수정
1 parent 5a538d8 commit 9f877e9

File tree

3 files changed

+2
-12
lines changed

3 files changed

+2
-12
lines changed

.github/workflows/CI-CD_Pipeline.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,6 @@ jobs:
2727
runs-on: ${{ matrix.os }}
2828
env:
2929
SPRING_PROFILES_ACTIVE: test-ci
30-
TEST_DATASOURCE_URL: jdbc:h2:mem:db_test;MODE=MySQL;DATABASE_TO_LOWER=TRUE;CASE_INSENSITIVE_IDENTIFIERS=TRUE
31-
TEST_DATASOURCE_USERNAME: sa
32-
TEST_DATASOURCE_PASSWORD:
33-
TEST_DATASOURCE_DRIVER: org.h2.Driver
34-
TEST_JPA_HIBERNATE_DDL_AUTO: create-drop
3530

3631
# ✅ Redis 서비스 추가
3732
services:

backend/src/main/java/com/ai/lawyer/global/config/MetaDBConfig.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
package com.ai.lawyer.global.config;
22

33
import org.springframework.boot.autoconfigure.batch.BatchDataSource;
4+
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
45
import org.springframework.boot.context.properties.ConfigurationProperties;
56
import org.springframework.boot.jdbc.DataSourceBuilder;
67
import org.springframework.context.annotation.Bean;
78
import org.springframework.context.annotation.Configuration;
8-
import org.springframework.context.annotation.Profile;
99

1010
import javax.sql.DataSource;
1111

@@ -15,6 +15,7 @@ public class MetaDBConfig {
1515
@Bean
1616
@BatchDataSource
1717
@ConfigurationProperties(prefix = "spring.datasource-meta")
18+
@ConditionalOnProperty(name = "meta.datasource.enabled", havingValue = "true", matchIfMissing = true)
1819
public DataSource metaDBSource() {
1920
return DataSourceBuilder.create().build();
2021
}

backend/src/test/resources/application-test-ci.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,6 @@ spring:
1111
password: ${TEST_DATASOURCE_PASSWORD}
1212
driver-class-name: ${TEST_DATASOURCE_DRIVER}
1313

14-
datasource-meta:
15-
jdbc-url: jdbc:h2:mem:meta_db;MODE=MySQL;DATABASE_TO_LOWER=TRUE;CASE_INSENSITIVE_IDENTIFIERS=TRUE
16-
username: sa
17-
password:
18-
driver-class-name: org.h2.Driver
19-
2014
jpa:
2115
show-sql: true
2216
hibernate:

0 commit comments

Comments
 (0)