wei.zhou

提交代码

......@@ -25,25 +25,12 @@ public class IClearApiSystemInit implements InitializingBean, ApplicationContext
private ApplicationContext applicationContext;
@Autowired
private AppInfoService appInfoService;
@Autowired
private DomesticDestinationMappingService domesticDestinationMappingService;
@Autowired
private DictionaryEntriesService dictionaryEntriesService;
@Autowired
private OrigplacecodeMappingService origplacecodeMappingService;
@Autowired
private ChmCarryPortService chmCarryPortService;
private IClearApiSystemService iClearApiSystemService;
@Override
public void setApplicationContext(ApplicationContext applicationContext)throws BeansException {
this.applicationContext = applicationContext;
}
@Override
......@@ -51,26 +38,9 @@ public class IClearApiSystemInit implements InitializingBean, ApplicationContext
try{
StopWatch sw = new StopWatch("initSystemCache");
sw.start("initCache");
log.info("init initAppInfo start>>>>>>>>>");
appInfoService.initAppInfo();
log.info("init initAppInfo end>>>>>>>>>");
log.info("init initDictionaryEntries start>>>>>>>>>");
dictionaryEntriesService.initDictionaryEntries();
log.info("init initDictionaryEntries end>>>>>>>>>");
log.info("init initDomesticDestinationMapping start>>>>>>>>>");
domesticDestinationMappingService.initDomesticDestinationMapping();
log.info("init initDomesticDestinationMapping end>>>>>>>>>");
log.info("init initOrigplacecodeMapping start>>>>>>>>>");
origplacecodeMappingService.initOrigplacecodeMapping();
log.info("init initOrigplacecodeMapping end>>>>>>>>>");
log.info("init initChmCarryPort start>>>>>>>>>");
chmCarryPortService.initChmCarryPort();
log.info("init initChmCarryPort start>>>>>>>>>");
log.info("init initSystemCache start>>>>>>>>>");
iClearApiSystemService.refreshAppInfoCache();
log.info("init initSystemCache end>>>>>>>>>");
sw.stop();
System.out.println(sw.prettyPrint());
......
......@@ -15,11 +15,27 @@ public class IClearApiSystemService {
@Autowired
private AppInfoService appInfoService;
@Autowired
private DomesticDestinationMappingService domesticDestinationMappingService;
@Autowired
private DictionaryEntriesService dictionaryEntriesService;
@Autowired
private OrigplacecodeMappingService origplacecodeMappingService;
@Autowired
private ChmCarryPortService chmCarryPortService;
/**
* 刷新缓存
*/
public void refreshAppInfoCache(){
appInfoService.initAppInfo();
dictionaryEntriesService.initDictionaryEntries();
domesticDestinationMappingService.initDomesticDestinationMapping();
origplacecodeMappingService.initOrigplacecodeMapping();
chmCarryPortService.initChmCarryPort();
}
......