Готова
This commit is contained in:
parent
2703c895b1
commit
ee645d78cf
@ -1,17 +0,0 @@
|
||||
package com.example.demo.Controller;
|
||||
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
@Controller
|
||||
public class Main {
|
||||
|
||||
@GetMapping
|
||||
public String helloWorld(@RequestParam(name = "name", required = false, defaultValue = "World") String name, Model model){
|
||||
model.addAttribute( "name", name);
|
||||
return "hello-world!";
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user