Skip to content

Commit

Permalink
[Refactor] 학교 디비 접속 실험
Browse files Browse the repository at this point in the history
  • Loading branch information
hen715 committed May 2, 2024
1 parent 5631092 commit d02f61e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import java.util.HashMap;
import java.util.Map;

/*@Configuration
@Configuration
@EnableTransactionManagement
@EnableJpaRepositories(basePackages = {"kr.inuappcenterportal.inuportal.repository"})
public class MySqlConfig {
Expand All @@ -44,4 +44,4 @@ public LocalContainerEntityManagerFactoryBean entityManagerFactory(EntityManager
PlatformTransactionManager transactionManager(@Qualifier("entityManagerFactory") EntityManagerFactory entityManagerFactory) {
return new JpaTransactionManager(entityManagerFactory);
}
}*/
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ public class OracleConfig {
@Value("${schoolDbPassword}")
private String password;
@Bean(name = "oracleDataSource")
//@ConfigurationProperties(prefix = "school.datasource")
@ConfigurationProperties(prefix = "school.datasource")
public DataSource secondDataSource() {
HikariConfig config = new HikariConfig();
/*HikariConfig config = new HikariConfig();
config.setJdbcUrl(url);
config.setUsername(username);
config.setPassword(password);
Expand All @@ -37,8 +37,8 @@ public DataSource secondDataSource() {
config.setMinimumIdle(1);
config.setConnectionTimeout(60000); // milliseconds
config.setIdleTimeout(600000); // milliseconds
return new HikariDataSource(config);
//return DataSourceBuilder.create().type(HikariDataSource.class).build();
return new HikariDataSource(config);*/
return DataSourceBuilder.create().type(HikariDataSource.class).build();
}

@Bean(name = "oracleJdbc")
Expand Down

0 comments on commit d02f61e

Please sign in to comment.