Skip to content
Snippets Groups Projects
BEAUVAIS ANTOINE's avatar
BEAUVAIS ANTOINE authored
Updated README documents.

See merge request !29
f7cfa865

BACK

2021-2022 SIL ERP solution

This is the BACK component for the 2021-2022 M2 SIL version of the ERP system, a project for the ERP subject.

This work is licensed under the CeCILL-B license agreement.

What's this?

BACK is the component that handles financial documentation as well as a Stock Management system for the articles for sale. It also provides other components information about the available products such as the number of each article in stock as well as their price.

Documentation

Documentation Home

The RESTful API is documented through an OpenAPI specification file that you can view here.

The project's Javadoc is automatically generated through CI for each commit on the master branch and can be found here.

Running

BACK is a Java Spring Web application built using the Gradle Build Tool. It uses Thymeleaf for Web templates.

Gradle allows you to quickly test the application by running a local test Apache TomCat server that hosts the application. It also allows you to quickly build a WAR archive for deployment on a production Apache TomCat or Eclipse Glassfish server.

It is recommended to use a Java IDE to run and deploy the application.

Preparing

Make sure you have a Java Development Kit version 8 or later installed on your machine. You must have the full JDK to build the program. You can deploy the WAR file on a machine with the JRE only.

Building and running

You can build and run the project using the following command on UNIX-based systems:

./gradlew bootRun --args="--spring.profiles.active=dev"

On Microsoft Windows, use:

.\gradlew bootRun --args="--spring.profiles.active=dev"

When running, you can reach the application at http://127.0.0.1:8080/.

To stop it, you should be able to use the CTRL+C keyboard shortcut. Otherwise, run another terminal in the project folder and use:

./gradlew stop

or, on Microsoft Windows,

.\gradlew stop

Calling the API

You can view the documentation here.

Use Postman or Advanced REST Client to make calls to the RESTful API.

Note that all calls to the API must specify the API key configured in the application's apikey.properties file in the apikey HTTP header.