Commit 94b1cb70 by Patryk Czarnik

ktoraGodzina

parent 63a1ad5c
package com.example.demo; package com.example.demo;
import java.time.LocalTime;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
...@@ -10,7 +12,18 @@ public class PierwszyKontroler { ...@@ -10,7 +12,18 @@ public class PierwszyKontroler {
@RequestMapping("/hello") @RequestMapping("/hello")
@ResponseBody @ResponseBody
public String sayHello() { public String sayHello() {
return "Hej, tu Spring, który jest ekstra fajnym narzędziem."; return "Hej, <b>tu Spring</b>, który jest ekstra fajnym narzędziem.";
}
@RequestMapping("/godzina")
@ResponseBody
public LocalTime ktoraGodzina() {
return LocalTime.now();
} }
} }
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