Payment Api is an API project of Organization
Payment Api is responsible to process all payments in Organization
Java 11 Open
Plugin Lombok
Docker and Docker Compose
Docker compose:
https://docs.docker.com/compose/install/
Lombok plugin:
Intellij: https://projectlombok.org/setup/intellij
Eclipse : https://projectlombok.org/setup/eclipse
Config environment variables according to specific environment src/main/application.yml
:
Name | Description | Default Value | Required |
---|---|---|---|
DATASOURCE_URL | Url JDBC to connect on database | jdbc:mysql://127.0.0.1:3306/payment?useSSL=false | ✅ |
DATASOURCE_USERNAME | Username of database | payment | ✅ |
DATASOURCE_PASSWORD | Password of database | payment | ✅ |
HIKARI_MINIMUM_IDLE | Minimum quantity of connection pool | 10 | ✅ |
HIKARI_MAXIMUM_POLL_SIZE | Maximum quantity of connection pool | 10 | ✅ |
ENV | App environment (development, staging or production) | development | ✅ |
Keep the file src/test/application-test.yml and table environments always up to date.
Go to project root folder:
Starting MySQL DataBase:
docker-compose up -d
Compiling Project:
./mvnw clean package
Running Converage:
./mvnw clean install jacoco:report
Check Coverage Page: {workdir}/target/site/jacoco/index.html
.
Running SonarQube:
./mvnw sonar:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.login={token} -Dsonar.organization=pedroarapua-github -Dsonar.projectKey=pedroarapua-payment-api -Dsonar.projectName=payment-api -Dsonar.sources=src/main/java -Dsonar.sourceEncoding=UTF-8 -Dsonar.exclusions='target/**,src/main/resources/**,src/main/java/com/organization/payment/v1/dto/**/*,src/main/java/com/organization/payment/enumeration/**/*,src/main/java/com/organization/payment/config/**/*' -Dsonar.java.binaries=target
Running Project in local environment:
./mvnw clean spring-boot:run -Dspring-boot.run.profiles=local