This commit is contained in:
2026-10-27 13:52:32 +09:00
parent fa606e3cbf
commit 309b2a2b79
5 changed files with 14 additions and 4 deletions

View File

@@ -30,7 +30,7 @@
<properties> <properties>
<java.version>21</java.version> <java.version>21</java.version>
</properties> </properties>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId> <artifactId>spring-boot-starter-data-jpa</artifactId>
@@ -77,6 +77,10 @@
<artifactId>spring-boot-starter-test</artifactId> <artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
</dependencies> </dependencies>
<build> <build>
<plugins> <plugins>
@@ -124,4 +128,3 @@
</build> </build>
</project> </project>

View File

@@ -34,4 +34,5 @@ public class LoginCheckInterceptor implements HandlerInterceptor {
} }
return true; return true;
} }
} }

View File

@@ -105,4 +105,5 @@ public class Employee {
public void setDateUpdate(LocalDateTime v) { public void setDateUpdate(LocalDateTime v) {
this.dateUpdate = v; this.dateUpdate = v;
} }
} }

View File

@@ -10,4 +10,5 @@ public interface EmployeeRepository extends JpaRepository<Employee, Integer> {
Optional<Employee> findByMailAddressAndFlgRetirement(String mailAddress, String flgRetirement); Optional<Employee> findByMailAddressAndFlgRetirement(String mailAddress, String flgRetirement);
Optional<Employee> findByMailAddress(String mailAddress); Optional<Employee> findByMailAddress(String mailAddress);
} }

View File

@@ -18,6 +18,9 @@ import com.example.demo.entity.Employee;
import com.example.demo.form.EmployeeForm; import com.example.demo.form.EmployeeForm;
import com.example.demo.repository.EmployeeRepository; import com.example.demo.repository.EmployeeRepository;
/** EMP-01:社員登録、EMP-02:社員編集 */ /** EMP-01:社員登録、EMP-02:社員編集 */
@Service @Service
public class EmployeeService { public class EmployeeService {
@@ -33,6 +36,7 @@ public class EmployeeService {
PasswordEncoder passwordEncoder) { PasswordEncoder passwordEncoder) {
this.employeeRepository = employeeRepository; this.employeeRepository = employeeRepository;
this.passwordEncoder = passwordEncoder; this.passwordEncoder = passwordEncoder;
} }
// ---------- 検索 ---------- // ---------- 検索 ----------