Untitled
unknown
plain_text
3 months ago
674 B
4
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