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

Added Thymeleaf and sample template for Web interface.

parent 91471c9f
Branches
1 merge request!15Internationalization.
...@@ -19,9 +19,11 @@ dependencies { ...@@ -19,9 +19,11 @@ dependencies {
implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.8' implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.8'
implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-web'
providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat' providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat'
testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.boot:spring-boot-starter-test'
implementation 'org.thymeleaf:thymeleaf-spring5'
} }
javadoc { javadoc {
......
...@@ -71,6 +71,10 @@ public class WebMvcConfig implements WebMvcConfigurer { ...@@ -71,6 +71,10 @@ public class WebMvcConfig implements WebMvcConfigurer {
public static final String MAPPING_GETSTOCKS = API_FULL_PREFIX + public static final String MAPPING_GETSTOCKS = API_FULL_PREFIX +
"/retrieveStocks"; "/retrieveStocks";
/**
* Web mapping for the login page.
*/
public static final String MAPPING_LOGIN = "/login";
/* /*
// TODO: Define default servlet. // 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()
{
}
}
<!DOCTYPE html>
<html lang="fr" xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Connexion - SIL ERP</title>
</head>
<body>
<h1>Connexion</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