Register with BCrytEncoder
This commit is contained in:
@@ -5,6 +5,7 @@ spring.jpa.hibernate.ddl-auto=update
|
||||
spring.jpa.open-in-view=true
|
||||
|
||||
server.port=8081
|
||||
spring.thymeleaf.cache=true
|
||||
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
BIN
target/classes/com/chantha/jdbc/controller/UserController.class
Normal file
BIN
target/classes/com/chantha/jdbc/controller/UserController.class
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
38
target/classes/templates/register.html
Normal file
38
target/classes/templates/register.html
Normal file
@@ -0,0 +1,38 @@
|
||||
<!doctype html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>Document</title>
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
|
||||
</head>
|
||||
<body>
|
||||
<div style="width: 200px; margin: auto; top: 500px ; ">
|
||||
<form class="form-horizontal" th:action="@{/register}" th:method="POST" th:object="${user}">
|
||||
<div class="form-group">
|
||||
<label for="usr">Name:</label>
|
||||
<input type="text" class="form-control" id="usr" th:name="userName">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="pwd">Password:</label>
|
||||
<input type="password" class="form-control" id="pwd" th:name="password">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sel1">Select list:</label>
|
||||
<select class="form-control" id="sel1" th:name="roles">
|
||||
<option th:value="Choose">Choose</option>
|
||||
<option th:value="ADMIN">ADMIN</option>
|
||||
<option th:value="DBA">DBA</option>
|
||||
<option th:value="USER">USER</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-success">Success</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user