Commit 56e57b9f by Patryk Czarnik

rozmowa: adres na poziomie klasy

parent 5fac3154
......@@ -5,18 +5,18 @@ import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@Controller
@RequestMapping("/rozmowa")
public class RozmowaController {
@GetMapping("/rozmowa")
@GetMapping
public String rozmowa() {
// w przypadku metody GET tylko wyświetlamy pusty formularz
return "rozmowa.html";
}
@PostMapping("/rozmowa")
@PostMapping
public String rozmowa(String imie, Model model) {
// w przypadku metody POST pobieramy przysłane imię i umieszczamy powitanie na stronie
// (o ile imię zostało przysłane)
......
Markdown is supported
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