diff options
author | Alexis de Talhouët <adetalhouet89@gmail.com> | 2019-03-07 11:23:17 -0500 |
---|---|---|
committer | Alexis de Talhouët <adetalhouet89@gmail.com> | 2019-03-07 16:24:14 +0000 |
commit | 5d51986fd1fc4f22d107b2fe6b127a2704278d43 (patch) | |
tree | 34413206d823c73ed19ba826d54d4038a42d0bd9 /ms/blueprintsprocessor/modules/commons/db-lib | |
parent | 62919a6dfa67efce97c09325b2f75a33f3bc4518 (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.kt | 12 |
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 98b6221d..4039b053 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 |