Browse Source

Project setup

main
Jesus 2 years ago
parent
commit
edc589d772
3 changed files with 4 additions and 10 deletions
  1. +0
    -1
      pom.xml
  2. +3
    -9
      src/main/java/com/jesuspinar/webserver/Manager.java
  3. +1
    -0
      src/main/resources/application.properties

+ 0
- 1
pom.xml View File

@ -35,7 +35,6 @@
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId> <artifactId>spring-boot-devtools</artifactId>
<version>2.7.5</version>
<scope>runtime</scope> <scope>runtime</scope>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>


+ 3
- 9
src/main/java/com/jesuspinar/webserver/Manager.java View File

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


+ 1
- 0
src/main/resources/application.properties View File

@ -0,0 +1 @@
spring.thymeleaf.cache=false

Loading…
Cancel
Save