This commit is contained in:
parent
bd4b042c3d
commit
1a13c08da8
@ -0,0 +1,25 @@
|
|||||||
|
package cc.fascinated.controller;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Fascinated (fascinated7)
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping(value = "/")
|
||||||
|
public class RootController {
|
||||||
|
/**
|
||||||
|
* A GET mapping to show the
|
||||||
|
*/
|
||||||
|
@ResponseBody
|
||||||
|
@GetMapping(value = "/")
|
||||||
|
public ResponseEntity<?> getWelcome() {
|
||||||
|
return ResponseEntity.ok(Map.of("message", "Hello!"));
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user