diff options
Diffstat (limited to 'adapters/mso-catalog-db-adapter/src/main')
-rw-r--r-- | adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/rest/CatalogDbAdapterRest.java | 2 | ||||
-rw-r--r-- | adapters/mso-catalog-db-adapter/src/main/resources/application-local.yaml | 8 | ||||
-rw-r--r-- | adapters/mso-catalog-db-adapter/src/main/resources/application.yaml | 23 | ||||
-rw-r--r-- | adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.12.1__UpdateAutoScaleOutRefData.sql (renamed from adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.12__UpdateAutoScaleOutRefData.sql) | 0 | ||||
-rw-r--r-- | adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.12__add_second_column_to_rainy_day_handler_for_after_retry.sql | 3 |
5 files changed, 18 insertions, 18 deletions
diff --git a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/rest/CatalogDbAdapterRest.java b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/rest/CatalogDbAdapterRest.java index eaf3e125a1..7ac23352a7 100644 --- a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/rest/CatalogDbAdapterRest.java +++ b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/rest/CatalogDbAdapterRest.java @@ -518,7 +518,7 @@ public class CatalogDbAdapterRest { try { if (smUuid != null && !"".equals(smUuid)) { logger.debug("Query Csar by service model uuid: {}",smUuid); - ToscaCsar toscaCsar = toscaCsarRepo.findOne(smUuid); + ToscaCsar toscaCsar = toscaCsarRepo.findById(smUuid).orElseGet(() -> null); if (toscaCsar != null) { QueryServiceCsar serviceCsar = new QueryServiceCsar(toscaCsar); entity = serviceCsar.JSON2(false, false); diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/application-local.yaml b/adapters/mso-catalog-db-adapter/src/main/resources/application-local.yaml index dbf09a898d..e896d9460f 100644 --- a/adapters/mso-catalog-db-adapter/src/main/resources/application-local.yaml +++ b/adapters/mso-catalog-db-adapter/src/main/resources/application-local.yaml @@ -11,11 +11,11 @@ mso: # H2 spring: datasource: - url: jdbc:mariadb://localhost:3306/catalogdb + jdbc-url: jdbc:mariadb://localhost:3306/catalogdb username: catalog password: catalog123 driver-class-name: org.mariadb.jdbc.Driver - initialize: true + initialization-mode: always jpa: show-sql: true @@ -39,10 +39,6 @@ server: tomcat: max-threads: 50 - -#Actuator -management: - context-path: /manage flyway: baseline-on-migrate: true diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/application.yaml b/adapters/mso-catalog-db-adapter/src/main/resources/application.yaml index 94705861f9..ff6f2378fa 100644 --- a/adapters/mso-catalog-db-adapter/src/main/resources/application.yaml +++ b/adapters/mso-catalog-db-adapter/src/main/resources/application.yaml @@ -17,15 +17,11 @@ mso: # CatalogDB spring: datasource: - url: jdbc:mariadb://${DB_HOST}:${DB_PORT}/catalogdb + jdbc-url: jdbc:mariadb://${DB_HOST}:${DB_PORT}/catalogdb username: ${DB_USERNAME} password: ${DB_PASSWORD} driver-class-name: org.mariadb.jdbc.Driver - dbcp2: - initial-size: 5 - max-total: 20 - validation-query: select 1 - test-on-borrow: true + initialization-mode: never jpa: show-sql: true hibernate: @@ -38,18 +34,23 @@ spring: fail-on-empty-beans: false flyway: baseline-on-migrate: false - url: jdbc:mariadb://${DB_HOST}:${DB_PORT}/catalogdb + jdbc-url: jdbc:mariadb://${DB_HOST}:${DB_PORT}/catalogdb user: ${DB_ADMIN_USERNAME} password: ${DB_ADMIN_PASSWORD} outOfOrder: true validateOnMigrate: false -#Actuator -management: - context-path: /manage +management: + endpoints: + web: + base-path: /manage + server: + servlet: + context-path: /manage metrics: se-global-registry: false export: prometheus: enabled: true # Whether exporting of metrics to Prometheus is enabled. - step: 1m # Step size (i.e. reporting frequency) to use.
\ No newline at end of file + step: 1m # Step size (i.e. reporting frequency) to use. +
\ No newline at end of file diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.12__UpdateAutoScaleOutRefData.sql b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.12.1__UpdateAutoScaleOutRefData.sql index 5e60f23965..5e60f23965 100644 --- a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.12__UpdateAutoScaleOutRefData.sql +++ b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.12.1__UpdateAutoScaleOutRefData.sql diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.12__add_second_column_to_rainy_day_handler_for_after_retry.sql b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.12__add_second_column_to_rainy_day_handler_for_after_retry.sql new file mode 100644 index 0000000000..f533e6842f --- /dev/null +++ b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.12__add_second_column_to_rainy_day_handler_for_after_retry.sql @@ -0,0 +1,3 @@ +use catalogdb; + +ALTER TABLE rainy_day_handler_macro ADD SECONDARY_POLICY varchar(200); |