diff options
author | Steve Smokowski <ss835w@att.com> | 2019-07-18 20:40:14 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-07-18 20:40:14 +0000 |
commit | 86a85de638889f587e6eed1b6888998c4d8dc6ad (patch) | |
tree | e43f3454959dee7dcdcf6a0d4f33886479d0200d /mso-api-handlers/mso-requests-db-repositories | |
parent | d31674ea37659ad01b411f561e4ff550d62a4c26 (diff) | |
parent | ce0a7807b322f16b86090899b33160825fa9fd10 (diff) |
Merge "Fix error updating request_processing_data"
Diffstat (limited to 'mso-api-handlers/mso-requests-db-repositories')
2 files changed, 21 insertions, 1 deletions
diff --git a/mso-api-handlers/mso-requests-db-repositories/pom.xml b/mso-api-handlers/mso-requests-db-repositories/pom.xml index f890dabedd..4dbf22cd87 100644 --- a/mso-api-handlers/mso-requests-db-repositories/pom.xml +++ b/mso-api-handlers/mso-requests-db-repositories/pom.xml @@ -30,7 +30,6 @@ <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-rest</artifactId> - <optional>true</optional> </dependency> <dependency> <groupId>com.h2database</groupId> diff --git a/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/configuration/ExposeEntityIdResourceConfiguration.java b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/configuration/ExposeEntityIdResourceConfiguration.java new file mode 100644 index 0000000000..575e5ff347 --- /dev/null +++ b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/configuration/ExposeEntityIdResourceConfiguration.java @@ -0,0 +1,21 @@ +package org.onap.so.db.request.configuration; + +import org.onap.so.db.request.beans.RequestProcessingData; +import org.springframework.data.rest.core.config.RepositoryRestConfiguration; +import org.springframework.data.rest.webmvc.config.RepositoryRestConfigurerAdapter; +import org.springframework.stereotype.Component; + +@Component +public class ExposeEntityIdResourceConfiguration extends RepositoryRestConfigurerAdapter { + + /** + * Spring Data Rest hides the ID by default, in order to have it in the JSON you have to manually configure that for + * your entity + * + * @param config + */ + @Override + public void configureRepositoryRestConfiguration(RepositoryRestConfiguration config) { + config.exposeIdsFor(RequestProcessingData.class); + } +} |