From 5d51986fd1fc4f22d107b2fe6b127a2704278d43 Mon Sep 17 00:00:00 2001 From: Alexis de Talhouët Date: Thu, 7 Mar 2019 11:23:17 -0500 Subject: Add support for resource-resolution storage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I0113191075804f6b77ce54c741bf0a1ccd356c77 Issue-ID: CCSDK-338 Signed-off-by: Alexis de Talhouët --- .../db/primary/PrimaryDatabaseConfiguration.kt | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'ms/blueprintsprocessor/modules') 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() properties["hibernate.hbm2ddl.auto"] = primaryDataSourceProperties.hibernateHbm2ddlAuto properties["hibernate.dialect"] = primaryDataSourceProperties.hibernateDialect -- cgit 1.2.3-korg