Controller accueil
This commit is contained in:
@@ -19,6 +19,8 @@ dependencies {
|
|||||||
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
|
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
|
||||||
developmentOnly 'org.springframework.boot:spring-boot-devtools'
|
developmentOnly 'org.springframework.boot:spring-boot-devtools'
|
||||||
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
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') {
|
tasks.named('test') {
|
||||||
|
|||||||
@@ -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";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1 +1 @@
|
|||||||
spring.application.name=Enchere
|
|
||||||
|
|||||||
1
src/main/resources/templates/accueil.html
Normal file
1
src/main/resources/templates/accueil.html
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<h1> Hello world !</h1>
|
||||||
Reference in New Issue
Block a user