Bonjour,
Je veux créer mon premier Hello world avec spring web mais il me parait qu'il existe des erreurs dans mon contrôleur et voici donc le fichier HelloController.java
Est-ce-que les erreurs ici c'est à cause des librairies que j'ai mais dans le projet?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 package com.tutorialspoint; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.ui.ModelMap; @Controller @RequestMapping("/hello") public class HelloController{ @RequestMapping(method = RequestMethod.GET) public String printHello(ModelMap model) { model.addAttribute("message", "Hello Spring MVC Framework!"); return "hello"; } }
voici les libs que j'ai mis:
commons-logging-1.1.3.jar
org.springframework.asm-3.1.0.RELEASE.jar
org.springframework.beans-3.1.0.RELEASE.jar
org.springframework.core-3.1.0.RELEASE.jar
org.springframework.expression-3.1.0.RELEASE.jar
org.springframework.web.jar
org.springframework.web.servlet-3.1.0.RELEASE.jar
spring-web.jar
Où est le problème exactement?
Et merci pour votre aide
Partager