Add JSTL to JSP sample
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
package org.springframework.boot.sample.jsp;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
@@ -7,7 +10,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
public class WelcomeController {
|
||||
|
||||
@RequestMapping("/")
|
||||
public String welcome() {
|
||||
public String welcome(Map<String,Object> model) {
|
||||
model.put("time", new Date());
|
||||
return "welcome";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user