Home>

Use Spring boot to start with 8080 using mav.addObject from Controller to HTML text
I want the date entered by default

Current state: leave blank
Mapping is done.

@GetMapping ("/")
public ModelAndView index (ModelAndView mav) {
mav.setViewName ("init");
Date date = new Date ();
SimpleDateFormat sdf = new SimpleDateFormat ("yyyy/MM/dd");
String today = sdf.format (date);
mav.addObject ("date", today);
return mav;
}

HTML description

I think I should use value, but I don't know how to match it with the description of the time leaf.