FR-01_全体反映なし
This commit is contained in:
@@ -51,10 +51,11 @@
|
|||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-devtools</artifactId>
|
<artifactId>spring-boot-devtools</artifactId> <!-- ここを修正 -->
|
||||||
<scope>runtime</scope>
|
<scope>runtime</scope>
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.mysql</groupId>
|
<groupId>com.mysql</groupId>
|
||||||
<artifactId>mysql-connector-j</artifactId>
|
<artifactId>mysql-connector-j</artifactId>
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ public class LoginController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ログイン画面表示
|
// ログイン画面表示
|
||||||
@GetMapping("/login")
|
@GetMapping("/")
|
||||||
public String showLogin() {
|
public String showLogin() {
|
||||||
return "login";
|
return "login";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,33 +1,82 @@
|
|||||||
package com.example.demo.form;
|
package com.example.demo.form;
|
||||||
|
|
||||||
/** 社員登録・編集フォーム */
|
/** 社員登録・編集フォーム */
|
||||||
public class EmployeeForm {
|
public class EmployeeForm {
|
||||||
private Integer idEmployee;
|
private Integer idEmployee;
|
||||||
private String nmEmployee = "";
|
private String nmEmployee = "";
|
||||||
private String knEmployee = "";
|
private String knEmployee = "";
|
||||||
private String mailAddress = "";
|
private String mailAddress = "";
|
||||||
private String password = "";
|
private String password = "";
|
||||||
private String flgAdmin = "0";
|
private String flgAdmin = "0";
|
||||||
private String flgRetirement = "0";
|
private String flgRetirement = "0";
|
||||||
|
|
||||||
public void trim() {
|
public void trim() {
|
||||||
nmEmployee = t(nmEmployee); knEmployee = t(knEmployee); mailAddress = t(mailAddress);
|
nmEmployee = t(nmEmployee);
|
||||||
flgAdmin = t(flgAdmin); flgRetirement = t(flgRetirement);
|
knEmployee = t(knEmployee);
|
||||||
if (password == null) password = "";
|
mailAddress = t(mailAddress);
|
||||||
}
|
flgAdmin = t(flgAdmin);
|
||||||
private static String t(String s) { return s == null ? "" : s.trim(); }
|
flgRetirement = t(flgRetirement);
|
||||||
|
if (password == null)
|
||||||
|
password = "";
|
||||||
|
}
|
||||||
|
|
||||||
public Integer getIdEmployee() { return idEmployee; }
|
private static String t(String s) {
|
||||||
public void setIdEmployee(Integer v) { this.idEmployee = v; }
|
return s == null ? "" : s.trim();
|
||||||
public String getNmEmployee() { return nmEmployee; }
|
}
|
||||||
public void setNmEmployee(String v) { this.nmEmployee = v; }
|
|
||||||
public String getKnEmployee() { return knEmployee; }
|
public Integer getIdEmployee() {
|
||||||
public void setKnEmployee(String v) { this.knEmployee = v; }
|
return idEmployee;
|
||||||
public String getMailAddress() { return mailAddress; }
|
}
|
||||||
public void setMailAddress(String v) { this.mailAddress = v; }
|
|
||||||
public String getPassword() { return password; }
|
public void setIdEmployee(Integer v) {
|
||||||
public void setPassword(String v) { this.password = v; }
|
this.idEmployee = v;
|
||||||
public String getFlgAdmin() { return flgAdmin; }
|
}
|
||||||
public void setFlgAdmin(String v) { this.flgAdmin = v; }
|
|
||||||
public String getFlgRetirement() { return flgRetirement; }
|
public String getNmEmployee() {
|
||||||
public void setFlgRetirement(String v) { this.flgRetirement = v; }
|
return nmEmployee;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNmEmployee(String v) {
|
||||||
|
this.nmEmployee = v;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getKnEmployee() {
|
||||||
|
return knEmployee;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setKnEmployee(String v) {
|
||||||
|
this.knEmployee = v;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMailAddress() {
|
||||||
|
return mailAddress;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMailAddress(String v) {
|
||||||
|
this.mailAddress = v;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPassword() {
|
||||||
|
return password;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPassword(String v) {
|
||||||
|
this.password = v;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFlgAdmin() {
|
||||||
|
return flgAdmin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFlgAdmin(String v) {
|
||||||
|
this.flgAdmin = v;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFlgRetirement() {
|
||||||
|
return flgRetirement;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFlgRetirement(String v) {
|
||||||
|
this.flgRetirement = v;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,12 +5,12 @@
|
|||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
<!-- 外部スクリプトの読み込み -->
|
<!-- 外部スクリプトの読み込み -->
|
||||||
<script th:src="@{/js/common.js}"></script>
|
<!-- <script th:src="@{/js/common.js}"></script>-->
|
||||||
|
|
||||||
<!-- CSSの読み込み -->
|
<!-- CSSの読み込み -->
|
||||||
<link rel="stylesheet" th:href="@{/css/all.css}" type="text/css">
|
<!-- <link rel="stylesheet" th:href="@{/css/all.css}" type="text/css">-->
|
||||||
<link rel="stylesheet" th:href="@{/css/style.css}" type="text/css">
|
<!-- <link rel="stylesheet" th:href="@{/css/style.css}" type="text/css">-->
|
||||||
|
|
||||||
<title>ログイン</title>
|
<title>ログイン</title>
|
||||||
</head>
|
</head>
|
||||||
@@ -19,21 +19,19 @@
|
|||||||
|
|
||||||
<div class="loginContainer">
|
<div class="loginContainer">
|
||||||
|
|
||||||
<h1>ログイン</h1>
|
<h1>書籍管理システム</h1>
|
||||||
|
<h2>ログイン</h2>
|
||||||
|
|
||||||
<form th:action="@{/doLogin}"
|
<form th:action="@{/doLogin}"
|
||||||
method="post"
|
method="post"
|
||||||
th:object="${loginInfoForm}">
|
th:object="${loginInfoForm}">
|
||||||
|
|
||||||
<!-- Validationエラーメッセージ -->
|
<!-- エラーメッセージ -->
|
||||||
<div class="msgBox error"
|
<div class="msgBox error"
|
||||||
th:if="${#fields.hasErrors('*')}">
|
th:if="${messageError != null}">
|
||||||
|
<span class="error"
|
||||||
<p th:each="err : ${#fields.errors('*')}"
|
th:text="${messageError.message}"></span>
|
||||||
th:text="${err}">
|
</div>
|
||||||
</p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<!-- メールアドレス -->
|
<!-- メールアドレス -->
|
||||||
|
|||||||
Reference in New Issue
Block a user