Skip to content
Snippets Groups Projects
Commit 9b1c1bca authored by BEAUVAIS ANTOINE's avatar BEAUVAIS ANTOINE
Browse files

Merge branch 'develop' into 'master'

Internationalization.

See merge request !15
parents 208c8d1b 7862adf9
Branches
1 merge request!15Internationalization.
......@@ -17,17 +17,18 @@ sur les produits disponibles tels que les prix de chaque article.
[Accueil documentation](https://erp-sil.pages.unistra.fr/back/)
L'API REST est documentée à travers un document OpenAPI qui peut être consulté
L'API REST est documentée à travers un fichier OpenAPI qui peut être consulté
[ici](https://erp-sil.pages.unistra.fr/back/openapi/index.html).
La documentation Java (Javadoc) du projet est généré automatiquement par
La documentation Java (Javadoc) du projet est générée automatiquement par
le système d'intégration continue (CI) pour chaque révision de la branche `master`
et peut être consultée [ici](https://erp-sil.pages.unistra.fr/back/javadoc/index.html) (en anglais).
### Exécution
BACK est une application Web [Java Spring](https://spring.io/) utilisant
le [système Gradle](https://gradle.org/).
le [système Gradle](https://gradle.org/). elle utilise [Thymeleaf](https://www.thymeleaf.org)
pour les *templates* Web.
Gradle permet d'essayer rapidement l'application en lançant un serveur
Web de test [Apache TomCat](https://tomcat.apache.org/) hébergeant
......@@ -48,7 +49,7 @@ Assurez-vous que votre machine possède un kit de développement Java (JDK) vers
peut être déployé sur une machine ne possédant que la JRE.
Afin que l'application fonctionne, vous devez configurer une clé d'authentification
pour l'API de l'application.
pour l'API REST.
Dans `src/main/resources`, créez un nouveau fichier `apikey.properties` contenant :
......@@ -89,7 +90,7 @@ ou, sur Microsoft Windows,
Vous pouvez trouver la documentation [ici](https://erp-sil.pages.unistra.fr/back/openapi/index.html).
Utilisez [Postman](https://www.postman.com/) ou [Advanced REST Client](https://install.advancedrestclient.com/install) pour l'appeler l'API REST.
Utilisez [Postman](https://www.postman.com/) ou [Advanced REST Client](https://install.advancedrestclient.com/install) pour appeler l'API REST.
Tous les appels vers l'API doivent posséder la clé d'authentification configurée
dans le fichier `apikey.properties` de l'application. Elle doit être spécifiée
......
......@@ -27,12 +27,14 @@ on the `master` branch and can be found [here](https://erp-sil.pages.unistra.fr/
### Running
BACK is a [Java Spring](https://spring.io/) Web application built using
the [Gradle Build Tool](https://gradle.org/).
the [Gradle Build Tool](https://gradle.org/). It uses [Thymeleaf](https://www.thymeleaf.org)
for Web templates.
Gradle allows you to quickly test the application by running a local
test [Apache TomCat](https://tomcat.apache.org/) server that hosts
the application. It also allows you to quickly build a WAR archive
for deployment on a production Apache TomCat or [Oracle Glassfish](https://www.oracle.com/middleware/technologies/glassfish-server.html) server.
for deployment on a production Apache TomCat or [Eclipse Glassfish](https://glassfish.org/)
server.
It is recommended to use a Java IDE to run and deploy the application.
......
......@@ -19,9 +19,11 @@ dependencies {
implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.8'
implementation 'org.springframework.boot:spring-boot-starter-web'
providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
implementation 'org.springframework.boot:spring-boot-starter-web'
providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
implementation 'org.thymeleaf:thymeleaf-spring5'
}
javadoc {
......
......@@ -71,6 +71,10 @@ public class WebMvcConfig implements WebMvcConfigurer {
public static final String MAPPING_GETSTOCKS = API_FULL_PREFIX +
"/retrieveStocks";
/**
* Web mapping for the login page.
*/
public static final String MAPPING_LOGIN = "/login";
/*
// TODO: Define default servlet.
......
/*
* CONTRAT DE LICENCE DE LOGICIEL LIBRE CeCILL-B
* https://cecill.info/licences/Licence_CeCILL-B_V1-fr.html
*/
package fr.unistra.sil.erp.back.controller.web;
import static fr.unistra.sil.erp.back.WebMvcConfig.MAPPING_LOGIN;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
/**
* Controller for the Web login interface.
*
* This controller handles the connection process of the user
* upon his arrival.
*
* @author BEAUVAIS ANTOINE
*/
@Controller
public class LoginController {
/**
* Logic for handling login.
*
* TODO: Actual implementation.
*/
@GetMapping(MAPPING_LOGIN)
public void login()
{
}
}
/**
* Web implementations of the HTTP controllers.
*/
package fr.unistra.sil.erp.back.controller.web;
\ No newline at end of file
#Application's name.
application.name=SIL ERP
#Login page's main title.
web.ui.login.login=Login
#Login page: Username label.
web.ui.login.username=Username
#Login page: Password label.
web.ui.login.password=Password
#Login page: Button's label.
web.ui.login.submit=Log in
#Application's name.
application.name=SIL ERP
#Login page's main title.
web.ui.login.login=Login
#Login page: Username label.
web.ui.login.username=Username
#Login page: Password label.
web.ui.login.password=Password
#Login page: Button's label.
web.ui.login.submit=Log in
#Application's name.
application.name=SIL ERP
#Login page's main title.
web.ui.login.login=Connexion
#Login page: Username label.
web.ui.login.username=Nom d'utilisateur
#Login page: Password label.
web.ui.login.password=Mot de passe
#Login page: Button's label.
web.ui.login.submit=Se connecter
<!DOCTYPE html>
<html lang="fr" xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title th:text="#{web.ui.login.login} + ' - ' + #{application.name}"></title>
</head>
<body>
<h1 th:text="#{web.ui.login.login}"></h1>
<p>TODO</p>
</body>
</html>
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment