Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @SpringBootApplication
- public class Application {
- public static void main(String[] args) {
- ApplicationContext ctx = SpringApplication.run(Application.class, args);
- System.out.println("Let's inspect the beans provided by Spring Boot:");
- }
- }
- @Controller
- public class GreetingController {
- @GetMapping("/greeting")
- public String greeting(@RequestParam(name = "name", required = false, defaultValue = "World") String name,
- Model model) {
- model.addAttribute("name", name);
- return "greeting";
- }
- }
Add Comment
Please, Sign In to add comment