package com.example.demo;

import java.time.LocalTime;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class HelloController {
	
	@RequestMapping("/")
	public String root() {
		return "index";
	}
	
	@RequestMapping("/hello")
	public String hello(Model model) {
		model.addAttribute("txt", "Hello world!");
		model.addAttribute("time", LocalTime.now());
		return "hello";
	}

}
