updated spring boot to 2.2.1
* added a header as fragment
This commit is contained in:
parent
89748e7ef5
commit
6f6f705495
@ -3,7 +3,7 @@ buildscript {
|
|||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
dependencies {
|
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")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,4 +14,10 @@ public class GreetingController {
|
|||||||
return "greeting";
|
return "greeting";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/home")
|
||||||
|
public String home(Model model) {
|
||||||
|
//model.addAttribute("name", name);
|
||||||
|
return "home";
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
15
prototype/src/main/resources/application.properties
Normal file
15
prototype/src/main/resources/application.properties
Normal 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
|
17
prototype/src/main/resources/templates/fragments/header.html
Normal file
17
prototype/src/main/resources/templates/fragments/header.html
Normal 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>
|
11
prototype/src/main/resources/templates/home.html
Normal file
11
prototype/src/main/resources/templates/home.html
Normal 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>
|
Reference in New Issue
Block a user