Skip to content
项目

hmcts/document-management-store-app

在 GitHub 查看

关于

Spring Boot Application to store Documents

网站与应用开发

这些数字如何统计

实测星标增长

24小时
0
7天
0
15天
0
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

Document Management Store App

License: MIT Build Status codecov Codacy Badge Codacy Badge Known Vulnerabilities

Document Management is a backend service to store and retrieve documents.

Tech

It uses:

  • Java
  • Spring boot
  • Junit, Mockito and SpringBootTest and Powermockito
  • Gradle
  • lombok project - Lombok project

Plugins

Environment variables

The following environment variables are required:

Name Default Description
IDAM_USER_BASE_URI - Base URL for IdAM's User API service (idam-app). http://localhost:4501 for the dockerised local instance or tunneled dev instance.
IDAM_S2S_BASE_URI - Base URL for IdAM's S2S API service (service-auth-provider). http://localhost:4502 for the dockerised local instance or tunneled dev instance.
MAX_FILE_SIZE 100MB Max file size

Note: The MAX_FILE_SIZE enforces limit on the document upload in the document management backend service. Additionally, the max request content length (including file sizes) need to be configured for the IIS web server (on Azure) via maxAllowedContentLength property for request filter in web.config (config file within source repository).

Setup

# Cloning repo and running though docker
git clone https://github.com/hmcts/document-management-store-app.git
cd document-management-store-app/

Clean and build the application:

./gradlew clean
./gradlew build

To run just the unit tests:

./gradlew test

To run the integration tests:

Requires docker desktop running

./gradlew integration

To run the application:

Requires docker desktop running You need to be logged in to Azure and have access to the ACR registry to pull the necessary containers for the application to run. If you are not logged in, you can do so by running az login in your terminal. Followed by az acr login --name hmctsprod to log in to the ACR registry

docker-compose -f docker-compose-dev.yml pull
docker-compose -f docker-compose-dev.yml up -d

# Run application
./gradlew bootRun```

Integration

There is currently a Java Client available here: https://github.com/hmcts/document-management-client

Swagger UI

To view our REST API go to http://{HOST}/swagger-ui/index.html On local machine with server up and running, link to swagger is as below

http://localhost:4603/swagger-ui/index.html if running on AAT, replace localhost with ingressHost data inside values.yaml class in the necessary component, making sure port number is also removed.

API Endpoints

A list of our endpoints can be found here

https://hmcts.github.io/cnp-api-docs/swagger.html?url=https://hmcts.github.io/cnp-api-docs/specs/document-management-store-app.json

Contract Tests (Pact)

For executing the pact consumer test run

./gradlew contract

The results of the consumer test will be published to the pact folder in the root directory of the project.

To run the provider pact tests, first comment the broker configuration in the BaseProviderTest and StoredDocumentMultipartProviderTest classes and uncomment the pact folder configuration, then run the below command to execute the provider pact tests locally.

./gradlew providerContractTests

Remove this line.

探索相关项目

加载中…