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