Make use of new GetMapping and PostMapping annotations
Closes gh-5277
This commit is contained in:
@@ -22,6 +22,7 @@ import java.util.Map;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseStatus;
|
||||
|
||||
@@ -31,7 +32,7 @@ public class WelcomeController {
|
||||
@Value("${application.message:Hello World}")
|
||||
private String message = "Hello World";
|
||||
|
||||
@RequestMapping("/")
|
||||
@GetMapping("/")
|
||||
public String welcome(Map<String, Object> model) {
|
||||
model.put("time", new Date());
|
||||
model.put("message", this.message);
|
||||
|
||||
Reference in New Issue
Block a user