Commit 0d990c00 by Patryk Czarnik

rozmowa: wydzielenie adresu na poziom klasy

parent 50604dd4
......@@ -4,16 +4,18 @@ import org.springframework.stereotype.Controller;
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;
@Controller
@RequestMapping("/rozmowa")
public class RozmowaController {
@GetMapping("/rozmowa")
@GetMapping
public String rozmowaGet() {
return "rozmowa.html";
}
@PostMapping("/rozmowa")
@PostMapping
public String rozmowaPost(String imie, Model model) {
if(imie != null && !imie.isBlank()) {
model.addAttribute("message", "Witaj " + imie);
......
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