Initial commit

This commit is contained in:
Leonid
2025-02-02 01:45:12 +03:00
commit 710e41ba6a
12 changed files with 304 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
package net.sytes.kashey.sweater;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.Map;
@Controller
public class GreetingController {
@GetMapping("/greeting")
public String greeting(@RequestParam(name = "name", required = false, defaultValue = "World") String name,
Map<String, Object> model) {
model.put("name", name);
return "greeting";
}
@GetMapping()
public String root(Map<String, Object> model) {
model.put("some", "Hello from main!!!");
return "main";
}
}

View File

@@ -0,0 +1,12 @@
package net.sytes.kashey.sweater;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class ServingWebContentApplication {
public static void main(String[] args) {
SpringApplication.run(ServingWebContentApplication.class, args);
}
}

View File

@@ -0,0 +1,10 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Getting Started: Serving Web Content</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<div>Hello {{name}}!!!</div>
</body>
</html>

View File

@@ -0,0 +1,5 @@
<html>
<body>
<div>{{some}}<div>
</body>
</html>