-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(oracle): add configuration for reactive oracle connection and mo…
…ngo db (#6) * chore(build): integrate ecommerce commons library * chore(build): make commons build skipped by default for local build * feat(oracle): add configuration for reactive oracle connection * feat(mongo): add ecommerce cosmos db configuration * fix: restore readme * fix: restore gradle build * fix: restore gradle build * fix: restore settings.gradle * fix: add env properties to README.md
- Loading branch information
1 parent
08db07c
commit 3e58a87
Showing
13 changed files
with
204 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,15 @@ | ||
DEFAULT_LOGGING_LEVEL=info | ||
APP_LOGGING_LEVEL=debug | ||
WEB_LOGGING_LEVEL=debug | ||
WEB_LOGGING_LEVEL=debug | ||
|
||
PM_ORACLE_HOST=localhost | ||
PM_ORACLE_PORT=1523 | ||
PM_ORACLE_DATABASE_NAME=pm | ||
PM_ORACLE_USERNAME=test | ||
PM_ORACLE_PASSWORD=test | ||
|
||
MONGO_HOST="pagopa-ecommerce-mongo" | ||
MONGO_PORT=27017 | ||
MONGO_USERNAME=admin | ||
MONGO_PASSWORD=password | ||
MONGO_SSL_ENABLED=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
src/main/kotlin/it/pagopa/ecommerce/helpdesk/configurations/OracleConfiguration.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package it.pagopa.ecommerce.helpdesk.configurations | ||
|
||
import io.r2dbc.spi.ConnectionFactories | ||
import io.r2dbc.spi.ConnectionFactory | ||
import io.r2dbc.spi.ConnectionFactoryOptions | ||
import java.nio.CharBuffer | ||
import org.springframework.beans.factory.annotation.Value | ||
import org.springframework.context.annotation.Bean | ||
import org.springframework.context.annotation.Configuration | ||
|
||
@Configuration | ||
class OracleConfiguration { | ||
|
||
@Bean | ||
fun getPMConnectionFactory( | ||
@Value("\${pm.oracle.host}") dbHost: String, | ||
@Value("\${pm.oracle.port}") dbPort: Int, | ||
@Value("\${pm.oracle.databaseName}") databaseName: String, | ||
@Value("\${pm.oracle.userName}") username: String, | ||
@Value("\${pm.oracle.password}") password: String | ||
): ConnectionFactory = | ||
ConnectionFactories.get( | ||
ConnectionFactoryOptions.builder() | ||
.option(ConnectionFactoryOptions.DRIVER, "oracle") | ||
.option(ConnectionFactoryOptions.HOST, dbHost) | ||
.option(ConnectionFactoryOptions.PORT, dbPort) | ||
.option(ConnectionFactoryOptions.DATABASE, databaseName) | ||
.option(ConnectionFactoryOptions.USER, username) | ||
.option(ConnectionFactoryOptions.PASSWORD, CharBuffer.wrap(password)) | ||
.build() | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.