Showing
2 changed files
with
20 additions
and
34 deletions
| ... | @@ -25,25 +25,12 @@ public class IClearApiSystemInit implements InitializingBean, ApplicationContext | ... | @@ -25,25 +25,12 @@ public class IClearApiSystemInit implements InitializingBean, ApplicationContext |
| 25 | private ApplicationContext applicationContext; | 25 | private ApplicationContext applicationContext; |
| 26 | 26 | ||
| 27 | @Autowired | 27 | @Autowired |
| 28 | - private AppInfoService appInfoService; | 28 | + private IClearApiSystemService iClearApiSystemService; |
| 29 | - | ||
| 30 | - @Autowired | ||
| 31 | - private DomesticDestinationMappingService domesticDestinationMappingService; | ||
| 32 | - | ||
| 33 | - @Autowired | ||
| 34 | - private DictionaryEntriesService dictionaryEntriesService; | ||
| 35 | - | ||
| 36 | - @Autowired | ||
| 37 | - private OrigplacecodeMappingService origplacecodeMappingService; | ||
| 38 | - | ||
| 39 | - @Autowired | ||
| 40 | - private ChmCarryPortService chmCarryPortService; | ||
| 41 | 29 | ||
| 42 | 30 | ||
| 43 | @Override | 31 | @Override |
| 44 | public void setApplicationContext(ApplicationContext applicationContext)throws BeansException { | 32 | public void setApplicationContext(ApplicationContext applicationContext)throws BeansException { |
| 45 | this.applicationContext = applicationContext; | 33 | this.applicationContext = applicationContext; |
| 46 | - | ||
| 47 | } | 34 | } |
| 48 | 35 | ||
| 49 | @Override | 36 | @Override |
| ... | @@ -51,26 +38,9 @@ public class IClearApiSystemInit implements InitializingBean, ApplicationContext | ... | @@ -51,26 +38,9 @@ public class IClearApiSystemInit implements InitializingBean, ApplicationContext |
| 51 | try{ | 38 | try{ |
| 52 | StopWatch sw = new StopWatch("initSystemCache"); | 39 | StopWatch sw = new StopWatch("initSystemCache"); |
| 53 | sw.start("initCache"); | 40 | sw.start("initCache"); |
| 54 | - log.info("init initAppInfo start>>>>>>>>>"); | 41 | + log.info("init initSystemCache start>>>>>>>>>"); |
| 55 | - appInfoService.initAppInfo(); | 42 | + iClearApiSystemService.refreshAppInfoCache(); |
| 56 | - log.info("init initAppInfo end>>>>>>>>>"); | 43 | + log.info("init initSystemCache end>>>>>>>>>"); |
| 57 | - | ||
| 58 | - log.info("init initDictionaryEntries start>>>>>>>>>"); | ||
| 59 | - dictionaryEntriesService.initDictionaryEntries(); | ||
| 60 | - log.info("init initDictionaryEntries end>>>>>>>>>"); | ||
| 61 | - | ||
| 62 | - log.info("init initDomesticDestinationMapping start>>>>>>>>>"); | ||
| 63 | - domesticDestinationMappingService.initDomesticDestinationMapping(); | ||
| 64 | - log.info("init initDomesticDestinationMapping end>>>>>>>>>"); | ||
| 65 | - | ||
| 66 | - log.info("init initOrigplacecodeMapping start>>>>>>>>>"); | ||
| 67 | - origplacecodeMappingService.initOrigplacecodeMapping(); | ||
| 68 | - log.info("init initOrigplacecodeMapping end>>>>>>>>>"); | ||
| 69 | - | ||
| 70 | - log.info("init initChmCarryPort start>>>>>>>>>"); | ||
| 71 | - chmCarryPortService.initChmCarryPort(); | ||
| 72 | - log.info("init initChmCarryPort start>>>>>>>>>"); | ||
| 73 | - | ||
| 74 | sw.stop(); | 44 | sw.stop(); |
| 75 | System.out.println(sw.prettyPrint()); | 45 | System.out.println(sw.prettyPrint()); |
| 76 | 46 | ... | ... |
| ... | @@ -15,11 +15,27 @@ public class IClearApiSystemService { | ... | @@ -15,11 +15,27 @@ public class IClearApiSystemService { |
| 15 | @Autowired | 15 | @Autowired |
| 16 | private AppInfoService appInfoService; | 16 | private AppInfoService appInfoService; |
| 17 | 17 | ||
| 18 | + @Autowired | ||
| 19 | + private DomesticDestinationMappingService domesticDestinationMappingService; | ||
| 20 | + | ||
| 21 | + @Autowired | ||
| 22 | + private DictionaryEntriesService dictionaryEntriesService; | ||
| 23 | + | ||
| 24 | + @Autowired | ||
| 25 | + private OrigplacecodeMappingService origplacecodeMappingService; | ||
| 26 | + | ||
| 27 | + @Autowired | ||
| 28 | + private ChmCarryPortService chmCarryPortService; | ||
| 29 | + | ||
| 18 | /** | 30 | /** |
| 19 | * 刷新缓存 | 31 | * 刷新缓存 |
| 20 | */ | 32 | */ |
| 21 | public void refreshAppInfoCache(){ | 33 | public void refreshAppInfoCache(){ |
| 22 | appInfoService.initAppInfo(); | 34 | appInfoService.initAppInfo(); |
| 35 | + dictionaryEntriesService.initDictionaryEntries(); | ||
| 36 | + domesticDestinationMappingService.initDomesticDestinationMapping(); | ||
| 37 | + origplacecodeMappingService.initOrigplacecodeMapping(); | ||
| 38 | + chmCarryPortService.initChmCarryPort(); | ||
| 23 | } | 39 | } |
| 24 | 40 | ||
| 25 | 41 | ... | ... |
-
Please register or login to post a comment