Introduction
In this project, you will learn how to build an employee management system using Spring IoC (Inversion of Control) container. The goal is to use the Spring IoC container to extract employee information from a configuration file and store it in a list collection, from which the employee information can be retrieved and printed.
ð Preview
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.labex.TestEmployeeSystem
May 11, 2024 2:28:53 AM org.labex.service.EmployeeServiceImpl addEmployee
INFO: Entering addEmployee() method
May 11, 2024 2:28:53 AM org.labex.service.EmployeeServiceImpl addEmployee
INFO: Entering addEmployee() method
May 11, 2024 2:28:53 AM org.labex.service.EmployeeServiceImpl addEmployee
INFO: Entering addEmployee() method
May 11, 2024 2:28:53 AM org.labex.service.EmployeeServiceImpl addEmployee
INFO: Entering addEmployee() method
May 11, 2024 2:28:53 AM org.labex.service.EmployeeServiceImpl addEmployee
INFO: Entering addEmployee() method
May 11, 2024 2:28:53 AM org.labex.service.EmployeeServiceImpl getAllEmployees
INFO: Entering getAllEmployees() method
Employees [employeeId=000001, employeeName=John Doe, employeeSex=Male, employeeBirthday=1993-11-06, employeeHiredate=2018-10-11, userId=1]
Employees [employeeId=000021, employeeName=Jane Smith, employeeSex=Female, employeeBirthday=1990-07-16, employeeHiredate=2019-10-21, userId=4]
Employees [employeeId=000022, employeeName=Alice Johnson, employeeSex=Female, employeeBirthday=1993-02-11, employeeHiredate=2019-12-27, userId=12]
Employees [employeeId=000035, employeeName=Bob Brown, employeeSex=Male, employeeBirthday=1991-06-23, employeeHiredate=2020-05-06, userId=19]
Employees [employeeId=000066, employeeName=Mary Taylor, employeeSex=Female, employeeBirthday=1997-12-21, employeeHiredate=2021-01-03, userId=20]
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.499 sec
ðŊ Tasks
In this project, you will learn:
- How to implement the
IEmployeeService
interface to handle employee-related operations - How to create the
EmployeeServiceImpl
class to provide the implementation of theIEmployeeService
interface - How to configure the Spring IoC container to enable annotation-based package scanning
- How to implement the
test()
method to retrieve employee information from the Spring IoC container and print it
ð Achievements
After completing this project, you will be able to:
- Use the Spring IoC container to manage employee data
- Implement service interfaces and their implementations using annotations
- Configure the Spring IoC container using an XML configuration file
- Retrieve and print employee information from the Spring IoC container