Skip to content

pagopa/pagopa-cruscotto-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pagopa-cruscotto-brackend

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 Documentation 📖

API - See the OpenApi 3 here

Project Structure

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

Development

To start your application in the dev profile, run:

./mvnw

Building for production

Packaging as jar

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

Packaging as war

To package your application as a war in order to deploy it to an application server, run:

./mvnw -Pprod,war clean verify

Testing

Spring Boot tests

To launch your application's tests, run:

./mvnw verify

Gatling

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

Others

Code quality using Sonar

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][].

About

Cruscotto Qualificazione & Certificazione PT EC (BE)

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 8

Languages