Untitled
unknown
plain_text
10 months ago
674 B
14
Indexable
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
@SpringBootApplication
public class GamingApp {
public static void main(String[] args) {
SpringApplication.run(GamingApp.class, args);
}
}
@Controller
class GameController {
@GetMapping("/")
public String home(Model model) {
model.addAttribute("message", "Welcome to Your Gaming App!");
return "home"; // Refers to home.html in src/main/resources/templates
}
}
Editor is loading...
Leave a Comment