package sklep.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.time.LocalDateTime;

@Controller
public class RootController {
    @GetMapping("/")
    @ResponseBody
    public String root() {
        return "Hello! Aplikacja sklep";
    }

    @GetMapping("/time")
    @ResponseBody
    public String currentTime() {
        LocalDateTime now = LocalDateTime.now();
        return now.toString();
    }

}
