Class DataInitialiser

java.lang.Object
com.equipmentrental.equipment_rental_system.config.DataInitialiser
All Implemented Interfaces:
org.springframework.boot.CommandLineRunner

@Component public class DataInitialiser extends Object implements org.springframework.boot.CommandLineRunner
Populates the database with sample data on application startup. Implements CommandLineRunner so it executes automatically after the Spring context is initialised.

Creates a representative set of categories, users, equipment items and bookings to demonstrate the system's functionality without requiring manual data entry. All dates use relative offsets from the current date so the sample data remains relevant regardless of when the application is started.