package com.trafficaudit.auditengine.service;
|
|
import org.springframework.boot.ApplicationArguments;
|
import org.springframework.boot.ApplicationRunner;
|
import org.springframework.core.annotation.Order;
|
import org.springframework.stereotype.Component;
|
|
import javax.annotation.Resource;
|
|
/** Ensures the city track source rule table exists and contains the initial Xiaogan rule. */
|
@Component
|
@Order(110)
|
public class TrackMileageCitySourceRuleInitializer implements ApplicationRunner {
|
|
@Resource
|
private TrackMileageCitySourceRuleService ruleService;
|
|
@Override
|
public void run(ApplicationArguments args) {
|
ruleService.ensureTableAndSeed();
|
}
|
}
|