diff --git a/api-repo/src/main/kotlin/com/few/api/repo/datasource/DataSourceConfig.kt b/api-repo/src/main/kotlin/com/few/api/repo/datasource/DataSourceConfig.kt index 8f4d3cca1..b5f96cf9e 100644 --- a/api-repo/src/main/kotlin/com/few/api/repo/datasource/DataSourceConfig.kt +++ b/api-repo/src/main/kotlin/com/few/api/repo/datasource/DataSourceConfig.kt @@ -19,7 +19,7 @@ class DataSourceConfig { } @Bean(name = [API_DATASOURCE]) - @ConfigurationProperties(prefix = "spring.datasource") + @ConfigurationProperties(prefix = "spring.datasource.hikari") fun apiDataSource(): DataSource { return DataSourceBuilder.create().type(HikariDataSource::class.java).build() } diff --git a/api-repo/src/main/resources/application-api-repo-local.yml b/api-repo/src/main/resources/application-api-repo-local.yml index 6ed2b475a..b34cdc23b 100644 --- a/api-repo/src/main/resources/application-api-repo-local.yml +++ b/api-repo/src/main/resources/application-api-repo-local.yml @@ -1,11 +1,11 @@ spring: datasource: - jdbcUrl: jdbc:mysql://localhost:13306/api?allowPublicKeyRetrieval=true&rewriteBatchedStatements=true - username: root - password: root - driver-class-name: com.mysql.cj.jdbc.Driver hikari: - pool-name: HikariCP + jdbcUrl: jdbc:mysql://localhost:13306/api?allowPublicKeyRetrieval=true&rewriteBatchedStatements=true + username: root + password: root + driver-class-name: com.mysql.cj.jdbc.Driver + pool-name: MAIN-POOL minimum-idle: 4 maximum-pool-size: 16 connection-timeout: 30000 # 30 seconds diff --git a/api-repo/src/main/resources/application-api-repo-prd.yml b/api-repo/src/main/resources/application-api-repo-prd.yml index 41994c11a..163bc8b11 100644 --- a/api-repo/src/main/resources/application-api-repo-prd.yml +++ b/api-repo/src/main/resources/application-api-repo-prd.yml @@ -1,11 +1,11 @@ spring: datasource: - jdbcUrl: ${DB_HOSTNAME}/api?allowPublicKeyRetrieval=true&rewriteBatchedStatements=true - username: ${DB_USERNAME} - password: ${DB_PASSWORD} - driver-class-name: com.mysql.cj.jdbc.Driver hikari: - pool-name: HikariCP + jdbcUrl: ${DB_HOSTNAME}/api?allowPublicKeyRetrieval=true&rewriteBatchedStatements=true + username: ${DB_USERNAME} + password: ${DB_PASSWORD} + driver-class-name: com.mysql.cj.jdbc.Driver + pool-name: MAIN-POOL minimum-idle: 4 maximum-pool-size: 16 connection-timeout: 30000 # 30 seconds