diff options
author | Brinda Santh <brindasanth@in.ibm.com> | 2019-07-31 12:31:09 -0400 |
---|---|---|
committer | Brinda Santh <brindasanth@in.ibm.com> | 2019-07-31 12:31:09 -0400 |
commit | 82753f0646ae2181baf247f51d2909058dcc3707 (patch) | |
tree | f210b615c87483a0f315ab193a4e876da21e68c6 /ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin | |
parent | d8183b1c5fb1a6ee0cd85fa0f65a10912a1ba529 (diff) |
Fix conflicting catalog service instance names.
Change-Id: Iec330d87f9609d42c05f8d4c7c8515fa37310a6e
Issue-ID: CCSDK-1046
Signed-off-by: Brinda Santh <brindasanth@in.ibm.com>
Diffstat (limited to 'ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin')
2 files changed, 9 insertions, 5 deletions
diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintProcessorCatalogServiceImpl.kt b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintProcessorCatalogServiceImpl.kt index 9faf879f0..9d5d630de 100755 --- a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintProcessorCatalogServiceImpl.kt +++ b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintProcessorCatalogServiceImpl.kt @@ -39,7 +39,7 @@ import java.util.* /** * Similar/Duplicate implementation in [org.onap.ccsdk.cds.controllerblueprints.service.load.ControllerBlueprintCatalogServiceImpl] */ -@Service +@Service("blueprintsProcessorCatalogService") class BlueprintProcessorCatalogServiceImpl(bluePrintRuntimeValidatorService: BluePrintValidatorService, private val bluePrintPathConfiguration: BluePrintPathConfiguration, private val blueprintModelRepository: BlueprintProcessorModelRepository) diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/PrimaryDatabaseConfiguration.kt b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/PrimaryDatabaseConfiguration.kt index 4ea407ada..a62867053 100644 --- a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/PrimaryDatabaseConfiguration.kt +++ b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/PrimaryDatabaseConfiguration.kt @@ -21,6 +21,7 @@ import org.slf4j.LoggerFactory import org.springframework.context.annotation.Bean import org.springframework.context.annotation.Configuration import org.springframework.context.annotation.Primary +import org.springframework.data.jpa.repository.config.EnableJpaAuditing import org.springframework.data.jpa.repository.config.EnableJpaRepositories import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate import org.springframework.jdbc.datasource.DriverManagerDataSource @@ -33,10 +34,12 @@ import javax.sql.DataSource @Configuration @EnableJpaRepositories( - basePackages = ["org.onap.ccsdk.cds.blueprintsprocessor.*"], - entityManagerFactoryRef = "primaryEntityManager", - transactionManagerRef = "primaryTransactionManager" + basePackages = ["org.onap.ccsdk.cds.blueprintsprocessor.*", + "org.onap.ccsdk.cds.controllerblueprints.*"], + entityManagerFactoryRef = "primaryEntityManager", + transactionManagerRef = "primaryTransactionManager" ) +@EnableJpaAuditing open class PrimaryDatabaseConfiguration(private val primaryDataSourceProperties: PrimaryDataSourceProperties) { val log = LoggerFactory.getLogger(PrimaryDatabaseConfiguration::class.java)!! @@ -45,7 +48,8 @@ open class PrimaryDatabaseConfiguration(private val primaryDataSourceProperties: open fun primaryEntityManager(): LocalContainerEntityManagerFactoryBean { val em = LocalContainerEntityManagerFactoryBean() em.dataSource = primaryDataSource() - em.setPackagesToScan("org.onap.ccsdk.cds.blueprintsprocessor.*") + em.setPackagesToScan("org.onap.ccsdk.cds.blueprintsprocessor.*", + "org.onap.ccsdk.cds.controllerblueprints.*") em.jpaVendorAdapter = HibernateJpaVendorAdapter() val properties = HashMap<String, Any>() properties["hibernate.hbm2ddl.auto"] = primaryDataSourceProperties.hibernateHbm2ddlAuto |