diff --git a/build.gradle b/build.gradle index c670d26e7665f972648dab6b30a18a8d48b3a5ec..a85e4021a02c8461bda2203f29cd4d5fcef2160f 100644 --- a/build.gradle +++ b/build.gradle @@ -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 { diff --git a/src/main/java/fr/unistra/sil/erp/back/WebMvcConfig.java b/src/main/java/fr/unistra/sil/erp/back/WebMvcConfig.java index 2b7e9cc15681ffbba21a31629c1a3430a5317142..ac9009ffcf60bfddcbcece01e3f0161d44bda6ed 100644 --- a/src/main/java/fr/unistra/sil/erp/back/WebMvcConfig.java +++ b/src/main/java/fr/unistra/sil/erp/back/WebMvcConfig.java @@ -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. diff --git a/src/main/java/fr/unistra/sil/erp/back/controller/web/LoginController.java b/src/main/java/fr/unistra/sil/erp/back/controller/web/LoginController.java new file mode 100644 index 0000000000000000000000000000000000000000..fc1e5e7c63a3335853c98efd230b1839ae42b93a --- /dev/null +++ b/src/main/java/fr/unistra/sil/erp/back/controller/web/LoginController.java @@ -0,0 +1,32 @@ +/* + * 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() + { + } + +} diff --git a/src/main/resources/templates/login.html b/src/main/resources/templates/login.html new file mode 100644 index 0000000000000000000000000000000000000000..7e121e1ff3497203b488893befcd3825c8aa4025 --- /dev/null +++ b/src/main/resources/templates/login.html @@ -0,0 +1,12 @@ +<!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