| package com.zy.acs.fake.config; | 
|   | 
| import com.zy.acs.fake.service.CodeService; | 
| import com.zy.acs.fake.service.MapDataDispatcher; | 
| import com.zy.acs.fake.service.RouteService; | 
| import org.springframework.beans.factory.annotation.Autowired; | 
| import org.springframework.context.annotation.Bean; | 
| import org.springframework.context.annotation.Configuration; | 
|   | 
| /** | 
|  * Created by vincent on 2023/7/14 | 
|  */ | 
| @Configuration | 
| public class MapDataConfig { | 
|   | 
|     @Autowired | 
|     private CodeService codeService; | 
|     @Autowired | 
|     private RouteService routeService; | 
|   | 
|     @Bean | 
|     public MapDataDispatcher getMapDataDispatcher() { | 
|         MapDataDispatcher dispatcher = new MapDataDispatcher(codeService, routeService); | 
|         String[][] codeMatrix = dispatcher.getCodeMatrix(null); | 
|         if (codeMatrix.length > 0) { | 
|             dispatcher.getDynamicMatrix(null); | 
|         } | 
|         return dispatcher; | 
|     } | 
|   | 
|   | 
| } |