diff --git a/book-rent/pom.xml b/book-rent/pom.xml index 565f780..606ba8b 100644 --- a/book-rent/pom.xml +++ b/book-rent/pom.xml @@ -51,10 +51,11 @@ org.springframework.boot -spring-devtools +spring-boot-devtools runtime true + com.mysql mysql-connector-j diff --git a/book-rent/src/main/java/com/example/demo/controller/LoginController.java b/book-rent/src/main/java/com/example/demo/controller/LoginController.java index d67fcc2..28d07d8 100644 --- a/book-rent/src/main/java/com/example/demo/controller/LoginController.java +++ b/book-rent/src/main/java/com/example/demo/controller/LoginController.java @@ -23,7 +23,7 @@ public class LoginController { } // ログイン画面表示 - @GetMapping("/login") + @GetMapping("/") public String showLogin() { return "login"; } diff --git a/book-rent/src/main/java/com/example/demo/form/EmployeeForm.java b/book-rent/src/main/java/com/example/demo/form/EmployeeForm.java index edc1561..fde4b39 100644 --- a/book-rent/src/main/java/com/example/demo/form/EmployeeForm.java +++ b/book-rent/src/main/java/com/example/demo/form/EmployeeForm.java @@ -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; + } } diff --git a/book-rent/src/main/resources/templates/login.html b/book-rent/src/main/resources/templates/login.html index 44aaf6e..8ad5ebc 100644 --- a/book-rent/src/main/resources/templates/login.html +++ b/book-rent/src/main/resources/templates/login.html @@ -5,12 +5,12 @@ - - + + - - - + + + ログイン @@ -19,21 +19,19 @@
-

ログイン

+

書籍管理システム

+

ログイン

- -
- -

-

- -
+ +
+ +