diff --git a/build.gradle b/build.gradle index b39cc77..031c96a 100644 --- a/build.gradle +++ b/build.gradle @@ -19,6 +19,8 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' developmentOnly 'org.springframework.boot:spring-boot-devtools' testImplementation 'org.springframework.boot:spring-boot-starter-test' + implementation 'org.springframework.boot:spring-boot-starter-web' + implementation 'org.springframework.boot:spring-boot-starter-validation' } tasks.named('test') { diff --git a/src/main/java/fr/eni/enchere/controllers/AccueilController.java b/src/main/java/fr/eni/enchere/controllers/AccueilController.java new file mode 100644 index 0000000..7786bea --- /dev/null +++ b/src/main/java/fr/eni/enchere/controllers/AccueilController.java @@ -0,0 +1,19 @@ +package fr.eni.enchere.controllers; + +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.GetMapping; + + +@Controller +public class AccueilController { + + public AccueilController() { + } + + @GetMapping({"/", "/accueil"}) + public String viewAccueil(Model model) { + return "accueil"; + } + +} diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index a00a7d7..8b13789 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1 +1 @@ -spring.application.name=Enchere + diff --git a/src/main/resources/templates/accueil.html b/src/main/resources/templates/accueil.html new file mode 100644 index 0000000..01d1df5 --- /dev/null +++ b/src/main/resources/templates/accueil.html @@ -0,0 +1 @@ +

Hello world !

\ No newline at end of file