Commit c726c36d by Patryk Czarnik

ktoraGodzina @ResponseBody

parent ff11594b
package sklep.controller;
import java.time.LocalDateTime;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
......@@ -18,5 +20,12 @@ public class RootController {
public String hello() {
return "Hello Spring";
}
@RequestMapping("/time")
@ResponseBody
public String ktoraGodzina() {
LocalDateTime dt = LocalDateTime.now();
return dt.toString();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment