feature: add Page Controller pattern (#2202)

* feat: create page controller

* add test

* add documentation

* fix: delete img file

* fix: modify App, SignupMode, UserController, pom.xml, and Readme

* fix: modify MVC files on page controller

* fix: modify readme file
This commit is contained in:
marikattt
2023-01-01 10:57:30 +02:00
committed by GitHub
parent b507913b5c
commit 4709922f11
19 changed files with 949 additions and 0 deletions
@@ -0,0 +1,25 @@
#
# The MIT License
# Copyright © 2014-2021 Ilkka Seppälä
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
#spring.thymeleaf.mode=HTML
server.port=51515
@@ -0,0 +1,27 @@
<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title> Signup </title>
</head>
<body>
<H1>Sign Up</H1>
<form action="#" th:action="@{/signup}" method="post" th:object="${signup}">
<div style="margin:20px">
<label>Name</label>
<input type="text" id="name" name="name"/>
</div>
<div style="margin:20px">
<label>Email</label>
<input type="text" id="email" name="email"/>
</div>
<div style="margin:20px">
<label>password</label>
<input type="password" id="password" name="password"/>
</div>
<div style="margin:20px">
<input type="submit" value="Signup">
</div>
</form>
</body>
@@ -0,0 +1,12 @@
<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title> User </title>
</head>
<body>
<h1>Your Information</h1>
<p>Name: <span th:text="${name}"></span></p>
<p>Email: <span th:text="${email}"></span></p>
</body>