updated spring boot to 2.2.1

* added a header as fragment
This commit is contained in:
Jannik 2019-11-25 16:15:36 +01:00
parent 89748e7ef5
commit 6f6f705495
Signed by: Seil0
GPG Key ID: E8459F3723C52C24
5 changed files with 50 additions and 1 deletions

View File

@ -3,7 +3,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:2.1.10.RELEASE")
classpath("org.springframework.boot:spring-boot-gradle-plugin:2.2.1.RELEASE")
}
}

View File

@ -14,4 +14,10 @@ public class GreetingController {
return "greeting";
}
@GetMapping("/home")
public String home(Model model) {
//model.addAttribute("name", name);
return "home";
}
}

View File

@ -0,0 +1,15 @@
# ----------------------------------------
# CORE PROPERTIES
# ----------------------------------------
# LOGGING
logging.level.org.springframework.web=INFO
# ----------------------------------------
# WEB PROPERTIES
# ----------------------------------------
# EMBEDDED SERVER CONFIGURATION (ServerProperties)
server.address=127.0.0.1
server.port=8080

View File

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="de" dir="ltr" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8">
<style></style>
</head>
<body>
<nav class="hero-secondary" th:fragment="header">
<div class="content-width flex">
<h1>Project eCommerce</h1>
<a>Angebote</a>
<input class="spacer" type="text" placeholder="Nach Produkten suchen...">
<button>Login</button>
</div>
</nav>
</body>
</html>

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="de" dir="ltr" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8">
<title>e-commerce</title>
<style></style>
</head>
<body>
<div th:replace="fragments/header :: header">Header</div>
</body>
</html>