aboutsummaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/modules/commons/db-lib
diff options
context:
space:
mode:
authorAlexis de Talhouët <adetalhouet89@gmail.com>2019-03-07 11:23:17 -0500
committerAlexis de Talhouët <adetalhouet89@gmail.com>2019-03-07 16:24:14 +0000
commit3b55bf8ce76b38c83916fd3a6570e0bfbc697ab8 (patch)
tree75f09caa8256ad9a12484c36bb6255097969c5a3 /ms/blueprintsprocessor/modules/commons/db-lib
parent68d8bda8229f89c9d120489baa7b1b228e0340fb (diff)
Add support for resource-resolution storage
Change-Id: I0113191075804f6b77ce54c741bf0a1ccd356c77 Issue-ID: CCSDK-338 Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com>
Diffstat (limited to 'ms/blueprintsprocessor/modules/commons/db-lib')
-rw-r--r--ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/db/primary/PrimaryDatabaseConfiguration.kt12
1 files changed, 5 insertions, 7 deletions
diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/db/primary/PrimaryDatabaseConfiguration.kt b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/db/primary/PrimaryDatabaseConfiguration.kt
index 98b6221d6..4039b053b 100644
--- a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/db/primary/PrimaryDatabaseConfiguration.kt
+++ b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/db/primary/PrimaryDatabaseConfiguration.kt
@@ -33,9 +33,9 @@ import javax.sql.DataSource
@Configuration
@EnableJpaRepositories(
- basePackages = ["org.onap.ccsdk.apps.blueprintsprocessor.db.primary"],
- entityManagerFactoryRef = "primaryEntityManager",
- transactionManagerRef = "primaryTransactionManager"
+ basePackages = ["org.onap.ccsdk.apps.blueprintsprocessor.*"],
+ entityManagerFactoryRef = "primaryEntityManager",
+ transactionManagerRef = "primaryTransactionManager"
)
open class PrimaryDatabaseConfiguration(private val primaryDataSourceProperties: PrimaryDataSourceProperties) {
val log = LoggerFactory.getLogger(PrimaryDatabaseConfiguration::class.java)!!
@@ -45,10 +45,8 @@ open class PrimaryDatabaseConfiguration(private val primaryDataSourceProperties:
open fun primaryEntityManager(): LocalContainerEntityManagerFactoryBean {
val em = LocalContainerEntityManagerFactoryBean()
em.dataSource = primaryDataSource()
- em.setPackagesToScan("org.onap.ccsdk.apps.blueprintsprocessor.db.primary")
-
- val vendorAdapter = HibernateJpaVendorAdapter()
- em.jpaVendorAdapter = vendorAdapter
+ em.setPackagesToScan("org.onap.ccsdk.apps.blueprintsprocessor.*")
+ em.jpaVendorAdapter = HibernateJpaVendorAdapter()
val properties = HashMap<String, Any>()
properties["hibernate.hbm2ddl.auto"] = primaryDataSourceProperties.hibernateHbm2ddlAuto
properties["hibernate.dialect"] = primaryDataSourceProperties.hibernateDialect