|
|
@ -1,8 +1,8 @@ |
|
|
|
package com.jesuspinar.webserver; |
|
|
|
|
|
|
|
import org.springframework.stereotype.Controller; |
|
|
|
import org.springframework.ui.Model; |
|
|
|
import org.springframework.web.bind.annotation.GetMapping; |
|
|
|
import org.springframework.ui.Model; |
|
|
|
|
|
|
|
import java.time.LocalDateTime; |
|
|
|
import java.time.format.DateTimeFormatter; |
|
|
@ -14,15 +14,9 @@ public class Manager { |
|
|
|
model.addAttribute("mesage", "Hello"); |
|
|
|
return "index"; |
|
|
|
} |
|
|
|
@GetMapping("/login") |
|
|
|
public String login(Model model){ |
|
|
|
model.addAttribute("mesage", "Hello"); |
|
|
|
model.addAttribute("login", "This is the login page"); |
|
|
|
return "index"; |
|
|
|
} |
|
|
|
|
|
|
|
@GetMapping("/login") |
|
|
|
public String Hour(Model model){ |
|
|
|
@GetMapping("/hour") |
|
|
|
public String hour(Model model){ |
|
|
|
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("dd/MM/yyyy HH:mm:ss"); |
|
|
|
model.addAttribute("dateTime", dtf.format(LocalDateTime.now())); |
|
|
|
// model.addAttribute("bg", "dark"); |
|
|
|