Cruscotto Qualificazione & Certificazione PT EC
This is a "gateway" application intended to be part of a microservice architecture.
This application is configured for Service Discovery and Configuration with Consul. On launch, it will refuse to start if it is not able to connect to Consul at http://localhost:8500. For more information, read our documentation on [Service Discovery and Configuration with Consul][].
API - See the OpenApi 3 here
Node is required for generation and recommended for development. package.json
is always generated for a better development experience with prettier, commit hooks, scripts and so on.
/src/*
structure follows default Java structure.
/src/main/docker
- Docker configurations for the application and services that the application depends on
To start your application in the dev profile, run:
./mvnw
To build the final jar and optimize the pagopaCruscottoBackend application for production, run:
./mvnw -Pprod clean verify
To ensure everything worked, run:
java -jar target/*.jar
To package your application as a war in order to deploy it to an application server, run:
./mvnw -Pprod,war clean verify
To launch your application's tests, run:
./mvnw verify
Performance tests are run by [Gatling][] and written in Scala. They're located in src/test/java/gatling/simulations.
You can execute all Gatling tests with
./mvnw gatling:test
Sonar is used to analyse code quality. You can start a local Sonar server (accessible on http://localhost:9001) with:
docker compose -f src/main/docker/sonar.yml up -d
Note: we have turned off forced authentication redirect for UI in src/main/docker/sonar.yml for out of the box experience while trying out SonarQube, for real use cases turn it back on.
You can run a Sonar analysis with using the sonar-scanner or by using the maven plugin.
Then, run a Sonar analysis:
./mvnw -Pprod clean verify sonar:sonar -Dsonar.login=admin -Dsonar.password=admin
If you need to re-run the Sonar phase, please be sure to specify at least the initialize
phase since Sonar properties are loaded from the sonar-project.properties file.
./mvnw initialize sonar:sonar -Dsonar.login=admin -Dsonar.password=admin
Additionally, Instead of passing sonar.password
and sonar.login
as CLI arguments, these parameters can be configured from sonar-project.properties as shown below:
sonar.login=admin
sonar.password=admin
For more information, refer to the [Code quality page][].