Documentation
This commit is contained in:
26
src/main/java/de/etecture/ga/config/InitData.java
Normal file
26
src/main/java/de/etecture/ga/config/InitData.java
Normal file
@@ -0,0 +1,26 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user