27 lines
529 B
Java
27 lines
529 B
Java
package de.etecture.ga.config;
|
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
import de.etecture.ga.service.GarageImportService;
|
|
import jakarta.annotation.PostConstruct;
|
|
import lombok.AllArgsConstructor;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
/**
|
|
* Import data on startup.
|
|
* This can be used to import old appointments.
|
|
*/
|
|
@Slf4j
|
|
@Component
|
|
@AllArgsConstructor
|
|
public class InitData {
|
|
|
|
private final GarageImportService importService;
|
|
|
|
@PostConstruct
|
|
private void importData() {
|
|
|
|
importService.importGarageData();
|
|
}
|
|
}
|