Skip to content

Commit 7fa80f3

Browse files
committed
ci/cd: 수정
1 parent 10ecf91 commit 7fa80f3

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed
Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,37 @@
11
package com.ai.lawyer.global.config;
22

3+
import org.springframework.beans.factory.annotation.Value;
34
import org.springframework.boot.autoconfigure.batch.BatchDataSource;
4-
import org.springframework.boot.context.properties.ConfigurationProperties;
55
import org.springframework.boot.jdbc.DataSourceBuilder;
66
import org.springframework.context.annotation.Bean;
77
import org.springframework.context.annotation.Configuration;
8-
import org.springframework.context.annotation.Profile;
98

109
import javax.sql.DataSource;
1110

12-
/*
1311
@Configuration
14-
@Profile("!test")
1512
public class MetaDBConfig {
1613

14+
@Value("${spring.datasource-meta.jdbc-url}")
15+
private String url;
16+
17+
@Value("${spring.datasource-meta.username}")
18+
private String username;
19+
20+
@Value("${spring.datasource-meta.password}")
21+
private String password;
22+
23+
@Value("${spring.datasource-meta.driver-class-name}")
24+
private String driver;
25+
1726
@Bean
1827
@BatchDataSource
19-
@ConfigurationProperties(prefix = "spring.datasource-meta")
2028
public DataSource metaDBSource() {
21-
return DataSourceBuilder.create().build();
29+
return DataSourceBuilder.create()
30+
.url(url)
31+
.username(username)
32+
.password(password)
33+
.driverClassName(driver)
34+
.build();
2235
}
2336

24-
}*/
37+
}

0 commit comments

Comments
 (0)